Skip to main content

Module scalars

Module scalars 

Source
Expand description

The kernel’s number: an interval [lo, hi] of f64, every operation rounded outward, so that a value encloses every real it could be and comparisons are three-valued (could_be_equal, definitely_greater). Number is what a residual of the constraint solvers is written in: a Scalar, or a crate::dual::Dual of one carrying derivatives.

Modules§

as_f64
#[serde(with = "geop_core_math::scalars::as_f64")]: a scalar as a plain number — its midpoint written, a sharp scalar read — the way a crate::vector::Vector serializes, for what travels to and from a viewer.

Structs§

Scalar
A number as the kernel computes with it: an interval [lo, hi] of f64 with outward-rounded arithmetic. The default is zero, [0, 0]. A plain value, borrowing nothing: what is worked out in one can be kept as any other value — a drawing’s views, in the session editing it.

Traits§

Number
A number a residual computes with: a Scalar, giving the residual’s value, or a crate::dual::Dual of one, giving its value and its derivatives by the variables it depends on. Every residual is written once, over T: Number, and evaluated with either. The comparisons act on the value alone.