Expand description
Arithmetic operations on BrightDate values.
Functionsยง
- absolute_
difference - Absolute difference between two BrightDate values.
- add
- Add
daysto a BrightDate value. - add_
microdays - Add microdays to a BrightDate value.
- add_
millidays - Add millidays to a BrightDate value.
- ceil_
to_ day - Ceiling to the nearest whole-day boundary.
- clamp
- Clamp
valueto the closed interval[min_val, max_val]. - compare
- Compare two BrightDate values, returning
std::cmp::Ordering. - difference
- Signed difference
a โ bin decimal days. - equals
- Test equality within
tolerancedecimal days. - floor_
to_ day - Floor to the nearest whole-day boundary.
- is_
in_ range - True if
valueis in the closed interval[start, end]. - lerp
- Linear interpolation:
a + t * (b โ a). - linspace
- Generate
nevenly-spaced values fromstarttoendinclusive. - max_of
- Return the maximum value in a slice. Panics if the slice is empty.
- midpoint
- Midpoint of two BrightDate values.
- min_of
- Return the minimum value in a slice. Panics if the slice is empty.
- round_
to_ microday - Round to nearest microday.
- round_
to_ milliday - Round to nearest milliday.
- sort
- Return a sorted copy of
values(does not mutate the input). - subtract
- Subtract
daysfrom a BrightDate value. - whole_
days_ between - Whole-day count between two BrightDate values (truncates toward zero).