replace fmt::Default with fmt::Show
This commit is contained in:
parent
0c903a7ec5
commit
17b9f5c066
5 changed files with 9 additions and 9 deletions
|
@ -204,8 +204,8 @@ Angle<S> for Deg<S> {
|
|||
#[inline] pub fn atan<S: Float>(s: S) -> Rad<S> { rad(s.atan()) }
|
||||
#[inline] pub fn atan2<S: Float>(a: S, b: S) -> Rad<S> { rad(a.atan2(&b)) }
|
||||
|
||||
impl<S: Float + fmt::Default> ToStr for Rad<S> { fn to_str(&self) -> ~str { format!("{} rad", self.s) } }
|
||||
impl<S: Float + fmt::Default> ToStr for Deg<S> { fn to_str(&self) -> ~str { format!("{}°", self.s) } }
|
||||
impl<S: Float + fmt::Show> ToStr for Rad<S> { fn to_str(&self) -> ~str { format!("{} rad", self.s) } }
|
||||
impl<S: Float + fmt::Show> ToStr for Deg<S> { fn to_str(&self) -> ~str { format!("{}°", self.s) } }
|
||||
|
||||
impl<S: Float + ApproxEq<S>>
|
||||
ApproxEq<S> for Rad<S> {
|
||||
|
|
|
@ -99,13 +99,13 @@ array!(impl<S> Point3<S> -> [S, ..3] _3)
|
|||
impl<S: Primitive> Point<S, Vec2<S>, [S, ..2]> for Point2<S> {}
|
||||
impl<S: Primitive> Point<S, Vec3<S>, [S, ..3]> for Point3<S> {}
|
||||
|
||||
impl<S: fmt::Default> ToStr for Point2<S> {
|
||||
impl<S: fmt::Show> ToStr for Point2<S> {
|
||||
fn to_str(&self) -> ~str {
|
||||
format!("[{}, {}]", self.x, self.y)
|
||||
}
|
||||
}
|
||||
|
||||
impl<S: fmt::Default> ToStr for Point3<S> {
|
||||
impl<S: fmt::Show> ToStr for Point3<S> {
|
||||
fn to_str(&self) -> ~str {
|
||||
format!("[{}, {}, {}]", self.x, self.y, self.z)
|
||||
}
|
||||
|
|
|
@ -280,7 +280,7 @@ Neg<Quat<S>> for Quat<S> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<S: fmt::Default> ToStr for Quat<S> {
|
||||
impl<S: fmt::Show> ToStr for Quat<S> {
|
||||
fn to_str(&self) -> ~str {
|
||||
format!("{} + {}i + {}j + {}k", self.s, self.v.x, self.v.y, self.v.z)
|
||||
}
|
||||
|
|
|
@ -157,7 +157,7 @@ ToMat4<S> for Decomposed<S, Vec3<S>, R> {
|
|||
impl<S: Float + ApproxEq<S>, R: Rotation3<S>>
|
||||
Transform3<S> for Decomposed<S,Vec3<S>,R> {}
|
||||
|
||||
impl<S: fmt::Default + Float, R: ToStr + Rotation3<S>>
|
||||
impl<S: fmt::Show + Float, R: ToStr + Rotation3<S>>
|
||||
ToStr for Decomposed<S,Vec3<S>,R> {
|
||||
fn to_str(&self) -> ~str {
|
||||
format!("(scale({}), rot({:s}), disp{:s})",
|
||||
|
|
|
@ -301,19 +301,19 @@ EuclideanVector<S, [S, ..4]> for Vec4<S> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<S: fmt::Default> ToStr for Vec2<S> {
|
||||
impl<S: fmt::Show> ToStr for Vec2<S> {
|
||||
fn to_str(&self) -> ~str {
|
||||
format!("[{}, {}]", self.x, self.y)
|
||||
}
|
||||
}
|
||||
|
||||
impl<S: fmt::Default> ToStr for Vec3<S> {
|
||||
impl<S: fmt::Show> ToStr for Vec3<S> {
|
||||
fn to_str(&self) -> ~str {
|
||||
format!("[{}, {}, {}]", self.x, self.y, self.z)
|
||||
}
|
||||
}
|
||||
|
||||
impl<S: fmt::Default> ToStr for Vec4<S> {
|
||||
impl<S: fmt::Show> ToStr for Vec4<S> {
|
||||
fn to_str(&self) -> ~str {
|
||||
format!("[{}, {}, {}, {}]", self.x, self.y, self.z, self.w)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue