-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathout.txt
59 lines (59 loc) · 1.76 KB
/
out.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
TEST: (Intialisation)
a - x: 0.0000 y: 0.0000 z: 0.0000
b - x: 1.0000 y: 1.0000 z: 1.0000
c - x: 2.0000 y: 3.0000 z: 5.0000
TEST: (Unary Operations)
Identity:
a - x: 0.0000 y: 0.0000 z: 0.0000
b - x: 1.0000 y: 1.0000 z: 1.0000
c - x: 2.0000 y: 3.0000 z: 5.0000
Negate:
a - x: -0.0000 y: -0.0000 z: -0.0000
b - x: -1.0000 y: -1.0000 z: -1.0000
c - x: -2.0000 y: -3.0000 z: -5.0000
Length:
a - 0.0000
b - 1.7321
c - 6.1644
Squared Length:
a - 0.0000
b - 3.0000
c - 38.0000
Unit Vector:
a - x: -nan y: -nan z: -nan
b - x: 0.5774 y: 0.5774 z: 0.5774
c - x: 0.3244 y: 0.4867 z: 0.8111
TEST: (Binary Operations)
Add:
a + b - x: 1.0000 y: 1.0000 z: 1.0000
b + c - x: 3.0000 y: 4.0000 z: 6.0000
c + a - x: 2.0000 y: 3.0000 z: 5.0000
Subtract:
a - b - x: -1.0000 y: -1.0000 z: -1.0000
b - c - x: -1.0000 y: -2.0000 z: -4.0000
c - a - x: 2.0000 y: 3.0000 z: 5.0000
Multiply:
a * b - x: 0.0000 y: 0.0000 z: 0.0000
b * c - x: 2.0000 y: 3.0000 z: 5.0000
c * a - x: 0.0000 y: 0.0000 z: 0.0000
Multiply (Constant):
a * 5 - x: 0.0000 y: 0.0000 z: 0.0000
b * 5 - x: 5.0000 y: 5.0000 z: 5.0000
c * 5 - x: 10.0000 y: 15.0000 z: 25.0000
Divide:
a / b - x: 0.0000 y: 0.0000 z: 0.0000
b / c - x: 0.5000 y: 0.3333 z: 0.2000
c / a - x: inf y: inf z: inf
Divide (Constant):
a / 5 - x: 0.0000 y: 0.0000 z: 0.0000
b / 5 - x: 0.2000 y: 0.2000 z: 0.2000
c / 5 - x: 0.4000 y: 0.6000 z: 1.0000
TEST: (Special Binary Operations)
Dot Product:
a . b - 0.0000
b . c - 10.0000
c . a - 0.0000
Cross Product:
a x b - x: 0.0000 y: 0.0000 z: 0.0000
b x c - x: 2.0000 y: -3.0000 z: 1.0000
c x a - x: 0.0000 y: 0.0000 z: 0.0000