Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How to apply algorithims to scripts (Continued)?

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.?

1 comment

0

Equations / formulas / mathematical functions are NOT algorithms. Algorithms are methods to compute something, NOT the computation itself.

2 answers

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.

1 comment

0

That is not an algorithm.

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.

This discussion is preserved as it was. New answers, comments, and votes are closed.