

Sam Johnston (Samith)
double sqrt( double x ) { float y; float delta; float maxError; if ( x <= 0 ) { return 0; } // initial guess y = x / 2; // refine maxError = x * 0.001; do { delta = ( y * y ) - x; y -= delta / ( 2 * y ); } while ( delta > maxError || delta < -maxError ); return y;}
quote:
Original post by Xori
Dont take this like I''m trying to call you a liar (as I am certainly not doing that) - but how did you get any chunk of the q3 source??
quote:Not really - on the x86, it just uses FSQRT.
Originally posted by crossbow
The standard sqrt function probably looks something like that...