package toffee
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=9e4e90d17f9b2af1b07071fe425bc2c519c849c4f1d1ab73cde512be2d874849
sha512=06e9c4a741590942e81a27738d0b5c0413fafec8cf3b7dae047ad69f155e7b718aa4223818dc161b7d028efffcfd3365905e264d6fd31d453910ddfa91dcf9b9
doc/toffee.geometry/Geometry/Line/index.html
Module 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.