RangeBase Class

Base class for Range1d, Range2d, Range3d.

Extended by

Methods

Name Description
constructor(): RangeBase    
coordinateToRangeAbsoluteDistance(x: number, low: number, high: number): number Static Given a coordinate and pair of range limits, return the smallest distance to the range.  
isExtremePoint2d(xy: Point2d): boolean Static Return true if either of x,y is outside the range `[_EXTREME_NEGATIVE, _EXTREME_POSITIVE]'  
isExtremePoint3d(xyz: Point3d): boolean Static Return true if any x or y or z is outside the range `[_EXTREME_NEGATIVE, _EXTREME_POSITIVE]'  
isExtremeValue(x: number): boolean Static Return true if x is outside the range `[_EXTREME_NEGATIVE, _EXTREME_POSITIVE]'  
multiplyIfPositive(q: number, factor: number, defaultValue: number0.0): number Static If a > 0, return (extrapolationFactor * a); otherwise return defaultValue  
npcScaleFactor(low: number, high: number): number Protected Static Return 0 if high<= low, otherwise 1/(high-low) for use in fractionalizing  
rangeToRangeAbsoluteDistance(lowA: number, highA: number, lowB: number, highB: number): number Static Return the min absolute distance from any point of [lowA,highA]' to any point of [lowB,highB]'.  

Properties

Name Type Description
_EXTREME_NEGATIVE Protected Static Readonly number Number considered to be impossibly negative for a coordinate in a range.  
_EXTREME_POSITIVE Protected Static Readonly number Number considered impossibly large possibly for a coordinate in a range.  

Defined in

Last Updated: 17 December, 2024