C# Single Epsilon
Description
Single Epsilon
represents the smallest positive Single
value that is greater than zero. This field is constant.
Syntax
Single.Epsilon
has the following syntax.
public const float Epsilon
Example
For example, the following code shows how to use Epsilon.
/*w w w . ja v a2s. co m*/
using System;
public class Example
{
public static void Main()
{
float[] values = { 0f, Single.Epsilon, Single.Epsilon * .5f };
for (int ctr = 0; ctr <= values.Length; ctr++)
{
Console.WriteLine(values[ctr]);
}
}
}
The code above generates the following result.