MCPcopy Create free account
hub / github.com/OxideEngine/Oxide / negate

Function negate

oxide_math/test/vector2.rs:54–60  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

52
53 #[test]
54 fn negate() {
55 let new_vector = vector2::Vector2 { x: 3.0, y: 4.0 };
56 let tar_vector = vector2::Vector2 { x: -3.0, y: -4.0 };
57 let res_vector = new_vector.negate();
58 assert_vector2_approx_eq(&tar_vector, &res_vector);
59 assert_approx_eq!(tar_vector.get_length(), res_vector.get_length());
60 }
61
62 #[test]
63 fn distance1() {

Callers

nothing calls this directly

Calls 2

assert_vector2_approx_eqFunction · 0.85
negateMethod · 0.45

Tested by

no test coverage detected