Difference between revisions of "Talk:LlFrand"

From Second Life Wiki
Jump to navigation Jump to search
Line 2: Line 2:
<b>1.13.3</b> specifying mag < 0 always returns 0.
<b>1.13.3</b> specifying mag < 0 always returns 0.


:ummm thats not good. I was rather fond of the old method. Why not use the copysign function found in "math.h" after stripping the sign to put it back on? (C99 revisions of glibc will support it aka, won't be in windows but will be in linux). Something like:
:ummm thats not good. I was rather fond of the old method. Why not use the copysign function found in "math.h" after stripping the sign to put it back on? (C99 revisions of glibc will support it aka, won't be in windows but will be in any recent version of linux GCC). Something like:
<pre>
<pre>
include &lt;math.h&gt;
include &lt;math.h&gt;

Revision as of 19:45, 31 January 2007

Known Issues

1.13.3 specifying mag < 0 always returns 0.

ummm thats not good. I was rather fond of the old method. Why not use the copysign function found in "math.h" after stripping the sign to put it back on? (C99 revisions of glibc will support it aka, won't be in windows but will be in any recent version of linux GCC). Something like:
include <math.h>

float llFrand(float range)
{
    return copysign(new_method(fabsf(range), range);
}
QED Strife Onizuka 18:45, 31 January 2007 (PST)