MCPcopy Create free account
hub / github.com/DanielChappuis/reactphysics3d / getOneUnitOrthogonalVector

Method getOneUnitOrthogonalVector

src/mathematics/Vector2.cpp:46–52  ·  view source on GitHub ↗

Return one unit orthogonal vector of the current vector

Source from the content-addressed store, hash-verified

44
45// Return one unit orthogonal vector of the current vector
46Vector2 Vector2::getOneUnitOrthogonalVector() const {
47
48 decimal l = length();
49 assert(l > MACHINE_EPSILON);
50
51 return Vector2(-y / l, x / l);
52}

Callers 5

initBeforeSolveMethod · 0.45
initBeforeSolveMethod · 0.45

Calls 1

Vector2Class · 0.50

Tested by

no test coverage detected