Utils IsNear Method Robocode Robot API for .NET
Tests if the two double values are near to each other. It is recommended to use this method instead of testing if the two doubles are equal using an this expression: value1 == value2. The reason being, that this expression might never become true due to the precision of double values. Whether or not the specified doubles are near to each other is defined by the following expression: (Math.abs(value1 - value2) < .00001)

Namespace: Robocode.Util
Assembly: robocode (in robocode.dll) Version:

public static bool IsNear(
	double value1,
	double value2

Return Value

Type: OnlineBoolean
See Also