computeScaledTolerance MethodStatic

Compute a distance tolerance appropriate for comparing the coordinates of geom.

  • The formula is absTol = minTol + relTol * geomSize, where geomSize is the largest absolute coordinate of the geometry range.
  • Scaling tolerances by geometry size helps account for the decreased floating point resolution between large coordinates. While using such scaled tolerances can enable more tolerance-sensitive constructions to succeed on far-flung geometries, on extremely small geometries at extremely large coordinate magnitudes, geometric constructions are generally more accurate when applied to the geometry temporarily translated to the origin.

computeScaledTolerance(geom: GeometryQuery | GeometryQuery[], options?: ScaledToleranceOptions): number

@returns the computed absolute tolerance

@see scaleToleranceForGeometry

Parameter Type Description
geom GeometryQuery | GeometryQuery[] geometry to measure
options ScaledToleranceOptions bundle of options

Returns - number

the computed absolute tolerance

Defined in

Last Updated: 24 September, 2026