Now that you have had your coffee, don’t forget about floating point imprecision:
// @kurtdekker: don't forget about floating point imprecision
using UnityEngine;
public class FloatingPointImprecision : MonoBehaviour
{
void Start ()
{
float a = 2000.0f;
float b = 0.1f;
float product = (a * b);
float answer = 200;
Debug.Log( "a = " + a);
Debug.Log( "b = " + b);
Debug.Log( "product of a*b = " + product);
Debug.Log( "answer = " + answer);
Debug.Log( "does product equal answer? " + (product == answer));
Debug.Log( "does a*b equal answer? " + ((a * b) == answer));
}
}
Your mileage almost certainly will vary. Choose an epsilon term and know it well.