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

Function distance2

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

Source from the content-addressed store, hash-verified

70
71 #[test]
72 fn distance2() {
73 let new_vector_1 = vector2::Vector2 { x: 3.0, y: 4.0 };
74 let new_vector_2 = vector2::Vector2 { x: -3.0, y: -4.0 };
75 let target = 10.0;
76 let result = new_vector_1.distance(&new_vector_2);
77 assert_approx_eq!(target, result);
78 }
79
80 #[test]
81 fn clamp() {

Callers

nothing calls this directly

Calls 1

distanceMethod · 0.45

Tested by

no test coverage detected