Skip to content

Commit 141c4a8

Browse files
committed
Updated to latest Rust
1 parent db2454f commit 141c4a8

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

src/cgmath/angle.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ Equiv<Deg<S>> for Deg<S> {
181181
impl<S: Float + ApproxEq<S>>
182182
Angle<S> for Rad<S> {
183183
#[inline] fn from<A: Angle<S>>(theta: A) -> Rad<S> { theta.to_rad() }
184-
#[inline] fn full_turn() -> Rad<S> { rad(Real::two_pi()) }
184+
#[inline] fn full_turn() -> Rad<S> { rad(Float::two_pi()) }
185185
}
186186

187187
impl<S: Float + ApproxEq<S>>

src/test/vector.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -137,17 +137,17 @@ mod test_length {
137137

138138
#[test]
139139
fn test_angle() {
140-
assert!(Vec2::new(1.0, 0.0).angle(&Vec2::new(0.0, 1.0)).approx_eq( &rad(Real::frac_pi_2()) ));
141-
assert!(Vec2::new(10.0, 0.0).angle(&Vec2::new(0.0, 5.0)).approx_eq( &rad(Real::frac_pi_2()) ));
142-
assert!(Vec2::new(-1.0, 0.0).angle(&Vec2::new(0.0, 1.0)).approx_eq( &-rad(Real::frac_pi_2()) ));
140+
assert!(Vec2::new(1.0, 0.0).angle(&Vec2::new(0.0, 1.0)).approx_eq( &rad(Float::frac_pi_2()) ));
141+
assert!(Vec2::new(10.0, 0.0).angle(&Vec2::new(0.0, 5.0)).approx_eq( &rad(Float::frac_pi_2()) ));
142+
assert!(Vec2::new(-1.0, 0.0).angle(&Vec2::new(0.0, 1.0)).approx_eq( &-rad(Float::frac_pi_2()) ));
143143

144-
assert!(Vec3::new(1.0, 0.0, 1.0).angle(&Vec3::new(1.0, 1.0, 0.0)).approx_eq( &rad(Real::frac_pi_3()) ));
145-
assert!(Vec3::new(10.0, 0.0, 10.0).angle(&Vec3::new(5.0, 5.0, 0.0)).approx_eq( &rad(Real::frac_pi_3()) ));
146-
assert!(Vec3::new(-1.0, 0.0, -1.0).angle(&Vec3::new(1.0, -1.0, 0.0)).approx_eq( &rad(2.0 * Real::frac_pi_3()) ));
144+
assert!(Vec3::new(1.0, 0.0, 1.0).angle(&Vec3::new(1.0, 1.0, 0.0)).approx_eq( &rad(Float::frac_pi_3()) ));
145+
assert!(Vec3::new(10.0, 0.0, 10.0).angle(&Vec3::new(5.0, 5.0, 0.0)).approx_eq( &rad(Float::frac_pi_3()) ));
146+
assert!(Vec3::new(-1.0, 0.0, -1.0).angle(&Vec3::new(1.0, -1.0, 0.0)).approx_eq( &rad(2.0 * Float::frac_pi_3()) ));
147147

148-
assert!(Vec4::new(1.0, 0.0, 1.0, 0.0).angle(&Vec4::new(0.0, 1.0, 0.0, 1.0)).approx_eq( &rad(Real::frac_pi_2()) ));
149-
assert!(Vec4::new(10.0, 0.0, 10.0, 0.0).angle(&Vec4::new(0.0, 5.0, 0.0, 5.0)).approx_eq( &rad(Real::frac_pi_2()) ));
150-
assert!(Vec4::new(-1.0, 0.0, -1.0, 0.0).angle(&Vec4::new(0.0, 1.0, 0.0, 1.0)).approx_eq( &rad(Real::frac_pi_2()) ));
148+
assert!(Vec4::new(1.0, 0.0, 1.0, 0.0).angle(&Vec4::new(0.0, 1.0, 0.0, 1.0)).approx_eq( &rad(Float::frac_pi_2()) ));
149+
assert!(Vec4::new(10.0, 0.0, 10.0, 0.0).angle(&Vec4::new(0.0, 5.0, 0.0, 5.0)).approx_eq( &rad(Float::frac_pi_2()) ));
150+
assert!(Vec4::new(-1.0, 0.0, -1.0, 0.0).angle(&Vec4::new(0.0, 1.0, 0.0, 1.0)).approx_eq( &rad(Float::frac_pi_2()) ));
151151
}
152152

153153
#[test]

0 commit comments

Comments
 (0)