Severi Salminen <sev### [at] notthissaunalahtifiinvalid> wrote:
> double nearPoint = nearestPointDistance - sqrt(halfChord2);
> double farPoint = nearestPointDistance + sqrt(halfChord2);
Perhaps you shouldn't rely on the ability of the compiler to realize
that the exact same sqrt() is being performed here, and instead calculate
it only once into a variable. That way you remove the risk of the
code actually calculating the slow sqrt() twice for no reason.
--
- Warp
Post a reply to this message
|