![]() |
Gs2 Missing or Depricated functions?
Hey,
I've been coding recently and been trying lots of code currently, not sure if the issue is from my part or the function itself. An important method used is sqrt() which is, the square root... It is as important as cos() and sin() for me. Quote:
PHP Code:
PHP Code:
And on serverside: PHP Code:
I came across lots of problems and will post them here shortly. Thanks in advance. (posted on Graalians as well) |
There are sometimes variables and functions in script help which do not exist. To perform the square root operation, take a value to the power of 0.5. For example, if you wanted to have an identical call as to what is found in script help, put the following code into a weaponscript called Math:
PHP Code:
|
Thanks but I'd like to know is there a reason under this deprication? Aren't all scripting/programming language supposed to have the basic math classes?
|
Most math functions are available in normal methods, such as cos, arccos, sin, arcsin, tan, arctan, getangle, and abs ( there are more ). Graal does have basic math as any language should, but it is a bit different sometimes, as it uses the operator ^ for math power, whereas in most languages ^ is used for bitwise comparisons.
|
All times are GMT +2. The time now is 07:25 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.