mirror of
https://github.com/BroncBotz3481/YAGSL
synced 2026-06-22 06:41:39 +00:00
Updated YAGSL to remove misconception of IEEERemainder
This commit is contained in:
@@ -31,7 +31,7 @@ public class PhysicsSim
|
||||
/* scales a random domain of [0, 2pi] to [min, max] while prioritizing the peaks */
|
||||
static double random(double min, double max)
|
||||
{
|
||||
return (max - min) / 2 * Math.sin(Math.IEEEremainder(Math.random(), 2 * 3.14159))
|
||||
return (max - min) / 2 * Math.sin((Math.random() % 2 * Math.PI))
|
||||
+ (max + min) / 2;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user