MCPcopy Create free account
hub / github.com/FastLED/FastLED / distance

Method distance

src/fl/math/geometry.h:175–180  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

173 }
174
175 T distance(const vec3 &p) const FL_NOEXCEPT {
176 T dx = x - p.x;
177 T dy = y - p.y;
178 T dz = z - p.z;
179 return fl::sqrt(dx * dx + dy * dy + dz * dz);
180 }
181
182 bool is_zero() const FL_NOEXCEPT { return (x == 0 && y == 0 && z == 0); }
183};

Callers 1

geometry.cppFile · 0.45

Calls 1

sqrtFunction · 0.85

Tested by

no test coverage detected