MCPcopy Create free account
hub / github.com/RozDavid/UnScene3D / distSq

Method distSq

utils/cpp_utils/include/vec3.h:191–195  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

189 }
190
191 static T distSq(const vec3 &v0, const vec3 &v1) {
192 return ((v0.array[0] - v1.array[0]) * (v0.array[0] - v1.array[0]) +
193 (v0.array[1] - v1.array[1]) * (v0.array[1] - v1.array[1]) +
194 (v0.array[2] - v1.array[2]) * (v0.array[2] - v1.array[2]));
195 }
196
197 static T dist(const vec3 &v0, const vec3 &v1) {
198 return sqrt((v0.array[0] - v1.array[0]) * (v0.array[0] - v1.array[0]) +

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected