package toffee
Build not yet checkedInstall
dune-project
Dependency
Authors
Maintainers
Sources
sha256=a92cbbcbe016fb19fb0a749222da0e459a9567aef3f4c7340d9bd6b71c53ed6f
sha512=6a7ab054605538bb31a2b73a1a6d093981a2704c9f0af5852221c05735290d74aca7c7282298c4d0f91e86a800e2ccd94b4918af883cd963449c758eb6b272b3
doc/toffee.geometry/Toffee_geometry/Point/index.html
Module Toffee_geometry.PointSource
2-dimensional point representation.
Concrete points of floats are Pointf.t, which store their floats flat.
'a t represents a 2-dimensional point with x and y coordinates.
Constants
Creation
Mapping
map2 f p1 p2 applies f to corresponding coordinates of p1 and p2.
Axis accessors
get axis point retrieves the component corresponding to axis.
set axis value point returns a new point with the component corresponding to axis set to value.
Transformations
Conversions
to_size point converts a point to a size by mapping x -> width and y -> height.
of_size size converts a size to a point by mapping width -> x and height -> y.
Comparison and string functions
compare cmp a b compares a and b lexicographically using cmp.
equal eq a b tests equality using eq for each coordinate.
to_string f point converts point to a string using f.
pp f fmt point prints point using fmt and f.