diff --git a/src/kernel/geometry/curves/circle.rs b/src/kernel/geometry/curves/circle.rs index e7c223823..0f9aafa93 100644 --- a/src/kernel/geometry/curves/circle.rs +++ b/src/kernel/geometry/curves/circle.rs @@ -48,7 +48,7 @@ impl Circle { /// error. pub fn point_model_to_curve(&self, point: &Point<3>) -> Point<1> { let v = point - self.center; - let atan = Scalar::atan2(v.y(), v.x()); + let atan = Scalar::atan2(v.y, v.x); let coord = if atan >= Scalar::ZERO { atan } else { diff --git a/src/math/point.rs b/src/math/point.rs index fd337e030..6dac297e4 100644 --- a/src/math/point.rs +++ b/src/math/point.rs @@ -77,17 +77,17 @@ impl Point<2> { impl Point<3> { /// Access the point's x coordinate pub fn x(&self) -> Scalar { - self.coords.x() + self.coords.x } /// Access the point's y coordinate pub fn y(&self) -> Scalar { - self.coords.y() + self.coords.y } /// Access the point's z coordinate pub fn z(&self) -> Scalar { - self.coords.z() + self.coords.z } } diff --git a/src/math/vector.rs b/src/math/vector.rs index 7ad369429..de42c4f0b 100644 --- a/src/math/vector.rs +++ b/src/math/vector.rs @@ -88,24 +88,9 @@ impl Vector<2> { } impl Vector<3> { - /// Access the vector's x coordinate - pub fn x(&self) -> Scalar { - self.0[0] - } - - /// Access the vector's y coordinate - pub fn y(&self) -> Scalar { - self.0[1] - } - - /// Access the vector's z coordinate - pub fn z(&self) -> Scalar { - self.0[2] - } - /// Construct a new vector from this vector's x and y components pub fn xy(&self) -> Vector<2> { - Vector::from([self.x(), self.y()]) + Vector::from([self.x, self.y]) } }