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

Function normalize

oxide_math/test/vector4.rs:217–234  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

215
216 #[test]
217 fn normalize() {
218 let new_vector = vector4::Vector4 {
219 x: 3.0,
220 y: 4.0,
221 z: 5.0,
222 w: 6.0,
223 };
224 let tar_vector = vector4::Vector4 {
225 x: 0.323_498_3,
226 y: 0.431_331_1,
227
228 z: 0.539_163_9,
229 w: 0.646_996_6,
230 };
231 let res_vector = new_vector.normalize();
232 assert_vector4_approx_eq(&tar_vector, &res_vector);
233 assert_approx_eq!(1.0, res_vector.get_length());
234 }
235}

Callers

nothing calls this directly

Calls 2

assert_vector4_approx_eqFunction · 0.85
normalizeMethod · 0.45

Tested by

no test coverage detected