pawn-lang / YSI-Includes

Just the YSI include files, none of the extra stuff.
208 stars 106 forks source link

Small issue | YSI_Core\y_utils\y_utils_random #648

Closed shierru closed 9 months ago

shierru commented 11 months ago

Line 661: stock RandomPointInCircleSampled(Float:centreX, Float:centreY, Float:radius, Float:outX, Float:outY)

Line 693: stock RandomPointInCircleCentred(Float:centreX, Float:centreY, Float:radius, Float:outX, Float:outY)

Line 717: stock RandomPointInCircleDistributed(Float:centreX, Float:centreY, Float:radius, Float:outX, Float:outY)

Here it is obvious that there is no '&' before Float:outX, Float:outY. Because of this, the warning 240.

Also in omp-stdlib in float.inc function was renamed floatsqrt -> floatsqroot. However, y_utils_random.inc uses floatsqrt, which causes an error when compiling with omp-stdlib that the function floatsqrt does not exist. I wish this could be fixed without breaking compatibility with samp-stdlib.

Y-Less commented 9 months ago

I don't think the function was renamed, I just double-checked and it seems to be floatsqroot in SA:MP as well. This is just a mistake on my part, probably because the C name is sqrt.