FloatExtensions.UnsetZero

Extension Method in FloatExtensions

Declaration

public static void UnsetZero(this ref float value, float newValue = 1.4E-32F, float epsilon = 1.401298E-45F)

Description

Sets the value to a new value if the value is zero given a margin of error specified by an epsilon.

Parameters

valueThe value to check.
newValueThe value to set if the original value is zero.
epsilonThe margin of error.