bbox.diagonal

The length of the box’s diagonal, the kernel’s measure of model size.

Value helperSince 0.3.0

Usage

TypeScript
BBox.diagonal(b: BBox): number

Parameters

  • bBBox

    The box to measure. Required. In model.

Returns

The distance from min to max in model units; 0 for an empty box or a single point.

Example

TypeScript
BBox.diagonal(BBox.ofPoints([Point3.origin, Point3.of(3, 4, 0)])) // → 5

See also