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

Method distance

src/Core/Transform/Polygon.cpp:36–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34 }
35
36 double PolygonPoint::distance(const Transform::UnitVector& position) const
37 {
38 const Transform::UnitVector pVec = position.to<Transform::Units::SceneUnits>();
39 return std::sqrt(std::pow((pVec.x - x), 2) + std::pow((pVec.y - y), 2));
40 }
41
42 UnitVector PolygonPoint::getRelativePosition(RelativePositionFrom from) const
43 {

Callers 3

getLengthMethod · 0.45
Polygon.cppFile · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected