SA-MP Forums Archive
Square roots? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Square roots? (/showthread.php?tid=237472)



Square roots? - Sasino97 - 09.03.2011

Hi, can you tell me how do I write square roots in PC language?

I only know that

+ Adds
- Subtracts
* Multiplies
/ Divides
^ Powers

and for square roots?


Re: Square roots? - JaTochNietDan - 09.03.2011

In Pawn you can use this function:

https://sampwiki.blast.hk/wiki/Floatsqroot


AW: Square roots? - Nero_3D - 09.03.2011

Quote:
Originally Posted by [GF]Sasino97
Посмотреть сообщение
^ Powers
Thats not power thats XOR, just check the float.inc for all math functions (sin, cos, tan, log, power, ...)


Re: Square roots? - Sasino97 - 10.03.2011

Yes, but Floatsqroot and Floatpower only return floats, I need it for integers


Re: Square roots? - THE_KNOWN - 10.03.2011

float round?


Re: Square roots? - Calgon - 10.03.2011

Convert your integer to a float, floatsqroot then floatround.