On 20/05/11 17:25, Wouter Klouwen wrote:
Possibly rounding errors. Whenever comparing floating point values you can't rely on equality but need to test for equivalence by including a small threshold (often called epsilon), so: if (a - b < 1e-5) match else no match
DDImage/FloatFunctions.h has IsEqual for two floats. Peter -- Peter Pearson, Software Engineer The Foundry, 6th Floor, The Communications Building, 48 Leicester Square, London, UK, WC2H 7LT Tel: +44 (0)20 7434 0449 - Fax: +44 (0)20 7434 1550 Web: www.thefoundry.co.uk The Foundry Visionmongers Ltd. Registered in England and Wales No: 4642027 _______________________________________________ Nuke-dev mailing list Nuke-dev@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/ http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-dev