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

Function normalize

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

Source from the content-addressed store, hash-verified

117
118 #[test]
119 fn normalize() {
120 let new_vector = vector2::Vector2 { x: 3.0, y: 4.0 };
121 let tar_vector = vector2::Vector2 { x: 0.6, y: 0.8 };
122 let res_vector = new_vector.normalize();
123 assert_vector2_approx_eq(&tar_vector, &res_vector);
124 assert_approx_eq!(1.0, res_vector.get_length());
125 }
126}

Callers

nothing calls this directly

Calls 2

assert_vector2_approx_eqFunction · 0.85
normalizeMethod · 0.45

Tested by

no test coverage detected