MCPcopy Create free account
hub / github.com/MyGUI/mygui / getOrthogonal

Method getOrthogonal

MyGUIEngine/src/msdfgen/core/Vector2.hpp:49–51  ·  view source on GitHub ↗

Returns a vector with the same length that is orthogonal to this one.

Source from the content-addressed store, hash-verified

47
48 /// Returns a vector with the same length that is orthogonal to this one.
49 inline Vector2 getOrthogonal(bool polarity = true) const {
50 return polarity ? Vector2(-y, x) : Vector2(y, -x);
51 }
52
53 /// Returns a vector with unit length that is orthogonal to this one.
54 inline Vector2 getOrthonormal(bool polarity = true, bool allowZero = false) const {

Callers 1

normalizeMethod · 0.80

Calls 1

Vector2Class · 0.85

Tested by

no test coverage detected