MCPcopy Create free account
hub / github.com/OneLoneCoder/olcPixelGameEngine / mag

Method mag

olcPixelGameEngine.h:659–662  ·  view source on GitHub ↗

Returns magnitude of vector

Source from the content-addressed store, hash-verified

657
658 // Returns magnitude of vector
659 inline auto mag() const
660 {
661 return std::sqrt(x * x + y * y);
662 }
663
664 // Returns magnitude squared of vector (useful for fast comparisons)
665 inline constexpr T mag2() const

Callers 5

DrawWarpedDecalMethod · 0.45
UpdateMethod · 0.45
RenderMethod · 0.45
CastRayDDAMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected