Finished Math folder section
commited
commit
ee4386904088b7ce9aa5a7bdb3f5226356c991c8
... | ... | @@ -9,6 +9,8 @@ This is also just a way to predict how Fanscript is gonna look if Martin decides |
9 | 9 | |
10 | 10 | This page is still being re-written by @Isaglish. Ping me in Discord if you have any questions. |
11 | 11 | |
12 | Work-In-Progress! |
|
13 | ||
12 | 14 | [[_TOC_]] |
13 | 15 | |
14 | 16 | # Folders |
... | ... | @@ -176,4 +178,78 @@ counter = Loop(start, end) { |
176 | 178 | ``` |
177 | 179 | |
178 | 180 | ## Math folder |
179 | work-in-progress |
|
... | ... | \ No newline at end of file |
0 | ```coffeescript |
|
1 | negatedNumber = Negate(number) |
|
2 | # or you can just do: |
|
3 | negatedNumber = negatedNumber * -1 |
|
4 | ||
5 | inversedRotation = Inverse(rotation) |
|
6 | ||
7 | addedVectors = Vector(x, y, z).AddVector(vector) |
|
8 | ||
9 | subtractedVectors = Vector(x, y, z).SubtractVector(vector) |
|
10 | ||
11 | scaledVector = Scale(vector, number) |
|
12 | ||
13 | rotatedVector = Rotate(vector, rotation) |
|
14 | ||
15 | combinedRotations = Combine(rotation1, rotation2) |
|
16 | ||
17 | isEqualVectors = EqualVectors(vector1, vector2) |
|
18 | ||
19 | isEqualObjects = EqualObjects(object1, object2) |
|
20 | ||
21 | isEqualTruths = EqualTruths(True, True) |
|
22 | ||
23 | random = Random(minimum, maximum) |
|
24 | ||
25 | randomSeed = RandomSeed(seed) |
|
26 | ||
27 | min = Minimum(number1, number2) |
|
28 | ||
29 | max = Maximum(number1, number2) |
|
30 | ||
31 | sin = Sin(number) |
|
32 | ||
33 | cos = Cos(number) |
|
34 | ||
35 | round = Round(number) |
|
36 | ||
37 | floor = Floor(number) |
|
38 | ||
39 | ceil = Ceiling(number) |
|
40 | ||
41 | absolute = Absolute(number) |
|
42 | ||
43 | mod = Modulo(number1, number2) |
|
44 | ||
45 | log = Logarithm(number, base) |
|
46 | ||
47 | x, y, z = BreakVector(vector) |
|
48 | ||
49 | vector = MakeVector(x, y, z) |
|
50 | ||
51 | normalize = Normalize(vector) |
|
52 | ||
53 | dot = DotProduct(vector1, vector2) |
|
54 | ||
55 | cross = CrossProduct(vector1, vector2) |
|
56 | ||
57 | x, y, z = BreakRotation(rotation) |
|
58 | ||
59 | rotation = MakeRotation(x, y, z) |
|
60 | ||
61 | dist = Distance(vector1, vector2) |
|
62 | ||
63 | lerp = LERP(from, to, amount) |
|
64 | ||
65 | axis = AxisAngle(axis, angle) |
|
66 | ||
67 | near, far = ScreenToWorld(x, y) |
|
68 | ||
69 | x, y = WorldToScreen(worldPos) |
|
70 | ||
71 | intersection = LiveVsPlane(from, to, point, normal) |
|
72 | ||
73 | lookRotation = LookRotation(direction, up) |
|
74 | ``` |
|
... | ... | \ No newline at end of file |