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

Function negate

oxide_math/test/vector3.rs:65–79  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

63
64 #[test]
65 fn negate() {
66 let new_vector = vector3::Vector3 {
67 x: 3.0,
68 y: 4.0,
69 z: 5.0,
70 };
71 let tar_vector = vector3::Vector3 {
72 x: -3.0,
73 y: -4.0,
74 z: -5.0,
75 };
76 let res_vector = new_vector.negate();
77 assert_vector3_approx_eq(&tar_vector, &res_vector);
78 assert_approx_eq!(tar_vector.get_length(), res_vector.get_length());
79 }
80
81 #[test]
82 fn distance1() {

Callers

nothing calls this directly

Calls 2

assert_vector3_approx_eqFunction · 0.85
negateMethod · 0.45

Tested by

no test coverage detected