Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to apply algorithims to scripts (Continued)?

Asked by 10 years ago

How do you apply certain Algorithims or math terms (etc..) such as ATAN2 which is in the mathfunction dump in the roblox wiki or certain asthmatically formulas to scripts. Like i learned geometry recently yet all they teach me is how cos = adjacent/hypotenuse and etc...

Like how does scripters like xSoulstealerx apply certain algorithims and etc... to script and how can i learn how to apply certain math terms and etc.. to scripts my self.?

0
Equations / formulas / mathematical functions are NOT algorithms. Algorithms are *methods* to compute something, NOT the computation itself. BlueTaslem 18071 — 10y

2 answers

Log in to vote
0
Answered by 10 years ago

http://wiki.roblox.com/index.php?title=Function_dump/Mathematical_functions This has all the functions under math.* and such.

There aren't specific ways to "apply" a formula or algorithm to something since you could do it many different ways.

An example algorithm: x = y + 2 Both x and y are variables in both programming and mathematical terms. You can manipulate them in whatever way you want using x = *number* and this will change the outcome of the equation.

0
That is not an algorithm. BlueTaslem 18071 — 10y
Ad
Log in to vote
-1
Answered by
ipiano 120
10 years ago

BlueTaslem is correct, those examples you game are not algorithms.

However, I believe the answer of your question of how to use math functions is simple:

angle = math.atan2(x,y)

Just use math. to get at the math functions.

Answer this question