| Posted: 10:43pm 08 Sep 2020 |
|
|
|
As far as MMBasic is concerned, There is no need to use INT at all
x=RND*LENGTH ' random between 0 and Length y=RND*LENGTH d=SQR(x^2+y^2) ' calculate the radius
Plotting with floats is OK.
I am not sure if staying with floats is true to the algorithm but it does help the accuracy a bit.
Jim |