hi,
i am calculating the distance between two points in 3d space using this formula:
Distance = √((distanceX*distanceX) + (distanceY*distanceY) + (distanceZ*distanceZ))
i have read (elsewhere) that taking a square root can use a lot of cpu power, and as this calculation is being done repeatedly i want to make it as efficient as possible, and perhaps explore alternative formula for this calculation.
so my questions are:
1. is taking a square root a particularly cpu intensive calculation in maxmsp? (or is this hardware dependent?)
and
2. is writing a javascript function to do the calculation going to add or detract from efficiency?
thanks
andrew