MCPcopy Create free account
hub / github.com/alecthomas/entityx / length

Method length

examples/example.cc:229–231  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

227 }
228
229 float length(const sf::Vector2f &v) {
230 return std::sqrt(v.x * v.x + v.y * v.y);
231 }
232
233 bool collided(const Candidate &left, const Candidate &right) {
234 return length(left.position - right.position) < left.radius + right.radius;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected