MayaFlux 0.5.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ winding_number()

float MayaFlux::Kinesis::winding_number ( std::span< const glm::vec2 >  path)
inlinenoexcept

Net revolutions a path turned through.

Parameters
pathPositions in chronological order
Returns
signed_turning divided by two pi

Reads directly as a count: near 1 for one counterclockwise loop, near -1 for one clockwise loop, near 0 for a path that returned to its starting heading without net rotation.

Definition at line 122 of file PathShape.hpp.

123{
124 return signed_turning(path) / (2.0F * std::numbers::pi_v<float>);
125}
float signed_turning(std::span< const glm::vec2 > path) noexcept
Turning accumulated along a path, with sign retained.
Definition PathShape.hpp:98

References signed_turning().

+ Here is the call graph for this function: