DoubleExtensions.UnsetZero

Extension Method in DoubleExtensions

Declaration

public static void UnsetZero(this ref double value, double newValue = 4.94065645841247E-324, double epsilon = 4.94065645841247E-324)

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.