Point2D -> Point
[kaka/rust-sdl-test.git] / src / core / controller.rs
index 1eeb13c..030d962 100644 (file)
@@ -1,4 +1,4 @@
-use common::Point2D;
+use common::Point;
 use {hashmap, point};
 use common::Radians;
 use sdl2::HapticSubsystem;
@@ -88,11 +88,11 @@ impl Stick {
     #[inline(always)] #[allow(dead_code)] pub fn left(&self) -> bool { self.x < -0.99 }
     #[inline(always)] #[allow(dead_code)] pub fn right(&self) -> bool { self.x > 0.99 }
 
-    pub fn to_axis_point(&self) -> Point2D<f64> {
+    pub fn to_axis_point(&self) -> Point<f64> {
        point!(self.x as f64, self.y as f64)
     }
 
-    pub fn to_point(&self) -> Point2D<f64> {
+    pub fn to_point(&self) -> Point<f64> {
        let p = point!(self.x as f64, self.y as f64);
        if p.length() > 1.0 {
            p.normalized()
@@ -102,7 +102,7 @@ impl Stick {
     }
 }
 
-impl From<&Stick> for Point2D<f64> {
+impl From<&Stick> for Point<f64> {
     fn from(item: &Stick) -> Self {
        Self {
            x: item.x as f64,