Class: FixedValuePrecisionCalculator
Serialization.PrecisionDetection.FixedValuePrecisionCalculator(precisionopt, autoAdjustOnIntegerOverflowopt)
A precision calculator based on the error introduced after rounding
Constructor
new FixedValuePrecisionCalculator(precisionopt, autoAdjustOnIntegerOverflowopt)
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
precision | int | <optional> | 2 | Fixed precision value |
autoAdjustOnIntegerOverflow | boolean | <optional> | false | When is true adjust precision to skip overflow |
Implements:
Methods
calculatePrecision(data, property) → {int}
Calculates an estimated precision value based on the error introduced after rounding
Parameters:
Name | Type | Description |
---|---|---|
data | Float32Array | The data to be used for the calculation |
property | PathBuilding.PathPoint.Property | Geometric/appearance property, which corresponds to the given sequence of path point data values |
Implements:
Returns:
A decimal precision value
Type
int