Math.cpp File Reference

Go to the source code of this file.

Namespaces

 playrho
 
 playrho::d2
 

Functions

Angle playrho::GetDelta (Angle a1, Angle a2) noexcept
 Gets the shortest angular distance to go from angle 1 to angle 2. More...
 
Length2 playrho::ComputeCentroid (const Span< const Length2 > &vertices)
 Computes the centroid of a counter-clockwise array of 3 or more vertices. More...
 
std::vector< Length2 > playrho::GetCircleVertices (Length radius, unsigned slices, Angle start=0_deg, Real turns=Real{1})
 Gets the vertices for a circle described by the given parameters. More...
 
NonNegative< Area > playrho::GetAreaOfCircle (Length radius)
 Gets the area of a circle. More...
 
NonNegative< Area > playrho::GetAreaOfPolygon (Span< const Length2 > vertices)
 Gets the area of a polygon. More...
 
SecondMomentOfArea playrho::GetPolarMoment (Span< const Length2 > vertices)
 Gets the polar moment of the area enclosed by the given vertices. More...
 
LinearVelocity2 playrho::d2::GetContactRelVelocity (const Velocity velA, const Length2 relA, const Velocity velB, const Length2 relB) noexcept
 Gets the contact relative velocity. More...