package toffee
Build not checkedInstall
dune-project
Dependency
Authors
Maintainers
Sources
sha256=ab48bc02082f9c1deea0769a13c2935df529536630745ec3a3d718f59656109b
sha512=c0f3c490e13ca60217d9d59c9bfdf3ada12e1565f04fe2a623e7c94298d519393eabe404e2317726712bf5e7fa860780a07494e77994ac05032e71f535c56910
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.