Tolerance class Null safety

Structure that specifies maximum allowable magnitudes for distances, durations, and velocity differences to be considered equal.

Constructors

Tolerance({double distance = _epsilonDefault, double time = _epsilonDefault, double velocity = _epsilonDefault})
Creates a Tolerance object. By default, the distance, time, and velocity tolerances are all ±0.001; the constructor arguments override this.
const

Properties

distance double
The magnitude of the maximum distance between two points for them to be considered within tolerance.
final
hashCode int
The hash code for this object.
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
time double
The magnitude of the maximum duration between two times for them to be considered within tolerance.
final
velocity double
The magnitude of the maximum difference between two velocities for them to be considered within tolerance.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

defaultTolerance → const Tolerance
A default tolerance of 0.001 for all three values.