Square roots?
#1

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?
Reply
#2

In Pawn you can use this function:

https://sampwiki.blast.hk/wiki/Floatsqroot
Reply
#3

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, ...)
Reply
#4

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

float round?
Reply
#6

Convert your integer to a float, floatsqroot then floatround.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)