Sorry, this might be a easy stupid question, but I need to know to be sure.
I have this if expression,
void Foo()
{
System.Double so
If something has been assigned from the result of an operation other than something = 0 then you better use:
if(Math.Abs(something) < Double.Epsilon)
{
//do something
}
Edit: This code is wrong. Epsilon is the smallest number, but not quite zero. When you wish to compare a number to another number, you need to think of what is the acceptable tolerance. Let's say that anything beyond .00001 you don't care about. That's the number you'd use. The value depends on the domain. However, it's mostly certainly never Double.Epsilon.