Click or drag to resize

Mathf2AreSame Method

Tells if the two floats are the same, allowing some small error.

Namespace:  KSPDev.MathUtils
Assembly:  KSPDev_Utils.1.1 (in KSPDev_Utils.1.1.dll) Version: 1.1 for KSP v1.6+
Syntax
C#
public static bool AreSame(
	float a,
	float b
)
Request Example View Source

Parameters

a
Type: SystemSingle
The first value to test.
b
Type: SystemSingle
The second value to test.

Return Value

Type: Boolean
true if the values difference is negligible.
Remarks
This method requires the difference between the values to be negligible. The absolute values are not counted.
See Also