package toffee
Build not checkedInstall
dune-project
Dependency
Authors
Maintainers
Sources
sha256=ab48bc02082f9c1deea0769a13c2935df529536630745ec3a3d718f59656109b
sha512=c0f3c490e13ca60217d9d59c9bfdf3ada12e1565f04fe2a623e7c94298d519393eabe404e2317726712bf5e7fa860780a07494e77994ac05032e71f535c56910
doc/toffee.geometry/Toffee_geometry/Line/index.html
Module Toffee_geometry.LineSource
An abstract line with start and end positions.
A line represents any type that has a start and an end, used throughout the layout engine to represent pairs of values along an axis (e.g., padding, margin, or insets in a single direction).
The type of a line with start and end values of type 'a.
The end_ field uses an underscore suffix to avoid conflict with the OCaml keyword end.
Constants
Creation
Transformations
map2 f line1 line2 applies f to corresponding components.
Operations
sum line returns the sum of start and end values.
This is typically used when computing total padding or margins along an axis.
Comparison and display
compare cmp a b compares two lines using cmp.
Compares start fields first, then end_ fields if start values are equal.
equal eq a b tests equality of two lines using eq.
Returns true if both start and end values are equal according to eq.
to_string f line converts line to a string representation using f to format individual values.
pp f fmt line pretty-prints line to fmt using f to format individual values.