diff options
Diffstat (limited to 'src/bitmap.rs')
-rw-r--r-- | src/bitmap.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/bitmap.rs b/src/bitmap.rs index 2f96a99..ba5c8f1 100644 --- a/src/bitmap.rs +++ b/src/bitmap.rs | |||
@@ -325,11 +325,11 @@ pub fn reflect_figure(figure: &[MapPoint], around: MapPoint) -> Vec<MapPoint> { | |||
325 | figure.iter().map(|pt| pt.reflect(around)).collect() | 325 | figure.iter().map(|pt| pt.reflect(around)).collect() |
326 | } | 326 | } |
327 | 327 | ||
328 | pub fn positive_angle_with_x(start: MapPoint, end: MapPoint) -> u32 { | 328 | pub fn positive_angle_with_x(start: MapPoint, end: MapPoint) -> f64 { |
329 | if end.x == start.x { | 329 | if end.x == start.x { |
330 | return 90; | 330 | return 90.; |
331 | } | 331 | } |
332 | let numer = (end.y as f64 - start.y as f64).abs(); | 332 | let numer = (end.y as f64 - start.y as f64).abs(); |
333 | let denum = (end.x as f64 - start.x as f64).abs(); | 333 | let denum = (end.x as f64 - start.x as f64).abs(); |
334 | (numer / denum).atan().to_degrees() as u32 | 334 | (numer / denum).atan().to_degrees() |
335 | } | 335 | } |