A circle is defined as having a radius
Work with Polar coordinates.
A Polar.Coord is just { angleRadians:number, distance: number }
.
Quad tree is a datastructure for efficiently determining whether a point/shape is at a location
Functions for producing points within a shape. Useful for creating patterns.
Triangle processing.
Helper functions for working with vectors, which can either be a Points.Point or Polar Polar.Coord. While most of the functionality is provided in either of those modules, the Vector module lets you cleanly interoperate between these two coordinates.
Converts an angle to another representation. Input value is assumed degrees unless it's an Angle type of has the unit.
Parses CSS-style angle strings. By default assumes degrees.
Computes the angle arc between a start and end angle, given in degrees. It properly accounts for the wrap-around values.
Sum angles together, accounting for the 'wrap around'.
Convert angle in degrees to angle in radians.
Returns the gradian value converted to degrees. By default it wraps, so any value 360 or greater wraps around.
Computes the angle arc between a start and end angle, given in radians. It properly accounts for the wrap-around values.
Inverts the angle so it points in the opposite direction of a unit circle
Angle from x-axis to point (ie. Math.atan2
)
Sum angles together, accounting for the 'wrap around'.
Convert angle in radians to angle in degrees
Returns a set of scaler functions, to convert to and from ranges.
Converts 'turns' to degrees. By defaults wraps the value, so turn value of 1 or 2 equal 0deg instead of 360 or 720deg.
A TrackedValueMap for points. Uses PointTracker to track added values.
A tracked point. Mutable. Useful for monitoring how it changes over time. Eg. when a pointerdown event happens, to record the start position and then track the pointer as it moves until pointerup.
Information about seen points
Results of point tracking
A scale function that takes an input value to scale.
Input can be in the form of { x, y }
or two number parameters.
A scaler than can convert to a from an output range
Arcs are a angle-limited circle. Essentially describing a wedge.