Equals
This class provides utility methods for comparing numbers and Angle objects, allowing for a specified tolerance. This is particularly useful when dealing with floating-point numbers where direct equality checks can be unreliable due to precision issues.
Methods
softWithoutValidation(double a, double b, double tolerance)
Checks if two double values are "softly" equal (i.e., within a given tolerance) without performing validation on the input values. This method is primarily for internal use where validation is handled elsewhere.
soft(double a, double b, double tolerance)
Checks if two double values are "softly" equal. It validates that all inputs are valid numbers and that the tolerance is non-negative. If the absolute difference between a and b is less than or equal to tolerance, it returns true.
soft(int a, int b, int tolerance)
Checks if two int values are "softly" equal within a given tolerance. It validates that all inputs are valid and tolerance is non-negative.
soft(float a, float b, float tolerance)
Checks if two float values are "softly" equal within a given tolerance. It validates that all inputs are valid and tolerance is non-negative.
soft(long a, long b, long tolerance)
Checks if two long values are "softly" equal within a given tolerance. It validates that all inputs are valid and tolerance is non-negative.
softWithoutValidation(Angle a, Angle b, Angle tolerance)
Checks if two Angle objects are "softly" equal within a given tolerance angle, without performing validation on the input angles. This method is primarily for internal use where validation is handled elsewhere.
soft(Angle a, Angle b, Angle tolerance)
Checks if two Angle objects are "softly" equal within a given tolerance angle. It validates that all input angles are valid. The comparison is based on the minimum delta between the angles in degrees.