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

Method cross

olcPixelGameEngine.h:714–717  ·  view source on GitHub ↗

Calculates 'scalar' cross product between this and another vector (useful for winding orders)

Source from the content-addressed store, hash-verified

712
713 // Calculates 'scalar' cross product between this and another vector (useful for winding orders)
714 inline constexpr auto cross(const v_2d& rhs) const
715 {
716 return this->x * rhs.y - this->y * rhs.x;
717 }
718
719 // Treat this as polar coordinate (R, Theta), return cartesian equivalent (X, Y)
720 inline constexpr v_2d cart() const

Callers 1

OnUserUpdateMethod · 0.45

Calls

no outgoing calls

Tested by 1

OnUserUpdateMethod · 0.36