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

Function distance2

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

Source from the content-addressed store, hash-verified

97
98 #[test]
99 fn distance2() {
100 let new_vector_1 = vector3::Vector3 {
101 x: 3.0,
102 y: 4.0,
103 z: 5.0,
104 };
105 let new_vector_2 = vector3::Vector3 {
106 x: -3.0,
107 y: -4.0,
108 z: -5.0,
109 };
110 let target = 14.142_136;
111 let result = new_vector_1.distance(&new_vector_2);
112 assert_approx_eq!(target, result);
113 }
114
115 #[test]
116 fn clamp() {

Callers

nothing calls this directly

Calls 1

distanceMethod · 0.45

Tested by

no test coverage detected