summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkonsumlamm <konsumlamm@gmail.com>2019-06-25 01:56:21 +0200
committerkonsumlamm <konsumlamm@gmail.com>2019-06-25 01:56:21 +0200
commit9e95243228f7650953398e80a60501b685c1ea3f (patch)
treec7fd56958e8ef218c55a80f6efb36b9135009d0a
parent4b4bcce0406cfb750ebf6c0499630fbe726ff5d8 (diff)
fixed testsHEADmaster
-rw-r--r--webhogg/game_server/src/math.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/webhogg/game_server/src/math.rs b/webhogg/game_server/src/math.rs
index a5d36eb..f01cd9a 100644
--- a/webhogg/game_server/src/math.rs
+++ b/webhogg/game_server/src/math.rs
@@ -303,16 +303,16 @@ mod tests {
#[test]
fn test_norm_vec2() {
- let a = Vec2{x: 2.0, y: 2.0};
+ let a = Vec2{x: 3.0, y: 4.0};
- assert!(f32::abs(a.norm() - 2.0) < 1e8);
+ assert!(f32::abs(a.norm() - 5.0) < 1e-8);
}
#[test]
fn test_norm2_vec2() {
let a = Vec2{x: 1.0, y: 2.0};
- assert!(f32::abs(a.norm2() - 5.0) < 1e8);
+ assert!(f32::abs(a.norm2() - 5.0) < 1e-8);
}
#[test]