diff options
| author | Arne Dußin | 2020-11-27 22:55:00 +0100 |
|---|---|---|
| committer | Arne Dußin | 2020-11-27 22:55:00 +0100 |
| commit | 4c4b57dc24bc36b3091931c9dcc36f6b1894a017 (patch) | |
| tree | 83f835eb850f249eff2e7694707464c9d4713a69 /src/map_data.rs | |
| parent | 99e935b63bb023cfd46c8f3d81074d3faf7ce592 (diff) | |
| download | graf_karto-4c4b57dc24bc36b3091931c9dcc36f6b1894a017.tar.gz graf_karto-4c4b57dc24bc36b3091931c9dcc36f6b1894a017.zip | |
Change to f64 as the preferred floating point number
Diffstat (limited to 'src/map_data.rs')
| -rw-r--r-- | src/map_data.rs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/map_data.rs b/src/map_data.rs index b17d779..a6ce5a0 100644 --- a/src/map_data.rs +++ b/src/map_data.rs @@ -12,9 +12,9 @@ use std::path::Path; /// transform, or the zoom-level #[derive(Serialize, Deserialize)] pub struct MapData { - rooms: Vec<Rect<f32>>, - polygons: Vec<Polygon<f32>>, - walls: Vec<(Vec2<f32>, Vec2<f32>)>, + rooms: Vec<Rect<f64>>, + polygons: Vec<Polygon<f64>>, + walls: Vec<(Vec2<f64>, Vec2<f64>)>, icons: Vec<IconInfo>, } @@ -67,24 +67,24 @@ impl MapData { file.write_all(&string.as_bytes()) } - pub fn rooms(&self) -> &Vec<Rect<f32>> { + pub fn rooms(&self) -> &Vec<Rect<f64>> { &self.rooms } - pub fn rooms_mut(&mut self) -> &mut Vec<Rect<f32>> { + pub fn rooms_mut(&mut self) -> &mut Vec<Rect<f64>> { &mut self.rooms } - pub fn polygons(&self) -> &Vec<Polygon<f32>> { + pub fn polygons(&self) -> &Vec<Polygon<f64>> { &self.polygons } - pub fn polygons_mut(&mut self) -> &mut Vec<Polygon<f32>> { + pub fn polygons_mut(&mut self) -> &mut Vec<Polygon<f64>> { &mut self.polygons } - pub fn walls(&self) -> &Vec<(Vec2<f32>, Vec2<f32>)> { + pub fn walls(&self) -> &Vec<(Vec2<f64>, Vec2<f64>)> { &self.walls } - pub fn walls_mut(&mut self) -> &mut Vec<(Vec2<f32>, Vec2<f32>)> { + pub fn walls_mut(&mut self) -> &mut Vec<(Vec2<f64>, Vec2<f64>)> { &mut self.walls } |
