vivid v0.2.1 Vivid.Transform.Point
Standard transformations which can be applied to points without knowing the details of the geometry.
Used extensively by Transform, however you can use these functions
as input to the Transformable protocol, should you require.
Summary
Functions
Rotate a point degrees around an origin point
Rotate a point radians around an origin point
Scale a point (ie move it) by multiplying it’s distance from the 0, 0 point by x_factor and y_factor
Scale a point (ie move it) by multiplying it’s distance from the origin point by x_factor and y_factor
Translate a point (ie move it) by adding x and y to it’s coordinates
Types
Functions
Rotate a point degrees around an origin point.
rotate_radians(Vivid.Point.t, Vivid.Point.t, radians) :: Vivid.Point.t
Rotate a point radians around an origin point.
Scale a point (ie move it) by multiplying it’s distance from the 0, 0 point by x_factor and y_factor.
Scale a point (ie move it) by multiplying it’s distance from the origin point by x_factor and y_factor.
Translate a point (ie move it) by adding x and y to it’s coordinates.