-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathVectorStructs.cs
More file actions
96 lines (78 loc) · 1.36 KB
/
VectorStructs.cs
File metadata and controls
96 lines (78 loc) · 1.36 KB
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
using System;
namespace LiveSplit.MemoryGraph
{
struct FloatVec2
{
public float x;
public float y;
public FloatVec2(float x, float y)
{
this.x = x;
this.y = y;
}
public double Norm => Math.Sqrt(x * x + y * y);
}
struct FloatVec2XZY
{
public float x;
public float y;
public float z;
public FloatVec2XZY(float x, float y, float z)
{
this.x = x;
this.y = 1;
this.z = z;
}
public double Norm => Math.Sqrt(x * x + z * z);
}
struct FloatVec3
{
public float x;
public float y;
public float z;
public FloatVec3(float x, float y, float z)
{
this.x = x;
this.y = y;
this.z = z;
}
public double Norm => Math.Sqrt(x * x + y * y + z * z);
}
struct IntVec2
{
public int x;
public int y;
public IntVec2(int x, int y)
{
this.x = x;
this.y = y;
}
public double Norm => Math.Sqrt((double)x * x + (double)y * y);
}
struct IntVec2XZY
{
public int x;
public int y;
public int z;
public IntVec2XZY(int x, int y, int z)
{
this.x = x;
this.y = 1;
this.z = z;
}
public double Norm => Math.Sqrt((double)x * x + (double)z * z);
}
struct IntVec3
{
public int x;
public int y;
public int z;
public IntVec3(int x, int y, int z)
{
this.x = x;
this.y = y;
this.z = z;
}
public double Norm => Math.Sqrt((double)x * x + (double)y * y + (double)z * z);
}
}