diff --git a/src/cgmath/angle.rs b/src/cgmath/angle.rs index dbea325..9b7defc 100644 --- a/src/cgmath/angle.rs +++ b/src/cgmath/angle.rs @@ -204,8 +204,8 @@ Angle for Deg { #[inline] pub fn atan(s: S) -> Rad { rad(s.atan()) } #[inline] pub fn atan2(a: S, b: S) -> Rad { rad(a.atan2(&b)) } -impl ToStr for Rad { fn to_str(&self) -> ~str { format!("{} rad", self.s) } } -impl ToStr for Deg { fn to_str(&self) -> ~str { format!("{}°", self.s) } } +impl ToStr for Rad { fn to_str(&self) -> ~str { format!("{} rad", self.s) } } +impl ToStr for Deg { fn to_str(&self) -> ~str { format!("{}°", self.s) } } impl> ApproxEq for Rad { diff --git a/src/cgmath/point.rs b/src/cgmath/point.rs index a9ff458..2c3fea8 100644 --- a/src/cgmath/point.rs +++ b/src/cgmath/point.rs @@ -99,13 +99,13 @@ array!(impl Point3 -> [S, ..3] _3) impl Point, [S, ..2]> for Point2 {} impl Point, [S, ..3]> for Point3 {} -impl ToStr for Point2 { +impl ToStr for Point2 { fn to_str(&self) -> ~str { format!("[{}, {}]", self.x, self.y) } } -impl ToStr for Point3 { +impl ToStr for Point3 { fn to_str(&self) -> ~str { format!("[{}, {}, {}]", self.x, self.y, self.z) } diff --git a/src/cgmath/quaternion.rs b/src/cgmath/quaternion.rs index 5670166..8790a78 100644 --- a/src/cgmath/quaternion.rs +++ b/src/cgmath/quaternion.rs @@ -280,7 +280,7 @@ Neg> for Quat { } } -impl ToStr for Quat { +impl ToStr for Quat { fn to_str(&self) -> ~str { format!("{} + {}i + {}j + {}k", self.s, self.v.x, self.v.y, self.v.z) } diff --git a/src/cgmath/transform.rs b/src/cgmath/transform.rs index d262b6e..6a001b6 100644 --- a/src/cgmath/transform.rs +++ b/src/cgmath/transform.rs @@ -157,7 +157,7 @@ ToMat4 for Decomposed, R> { impl, R: Rotation3> Transform3 for Decomposed,R> {} -impl> +impl> ToStr for Decomposed,R> { fn to_str(&self) -> ~str { format!("(scale({}), rot({:s}), disp{:s})", diff --git a/src/cgmath/vector.rs b/src/cgmath/vector.rs index dadcb09..83bceb9 100644 --- a/src/cgmath/vector.rs +++ b/src/cgmath/vector.rs @@ -301,19 +301,19 @@ EuclideanVector for Vec4 { } } -impl ToStr for Vec2 { +impl ToStr for Vec2 { fn to_str(&self) -> ~str { format!("[{}, {}]", self.x, self.y) } } -impl ToStr for Vec3 { +impl ToStr for Vec3 { fn to_str(&self) -> ~str { format!("[{}, {}, {}]", self.x, self.y, self.z) } } -impl ToStr for Vec4 { +impl ToStr for Vec4 { fn to_str(&self) -> ~str { format!("[{}, {}, {}, {}]", self.x, self.y, self.z, self.w) }