-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathViconVersion.kl
38 lines (32 loc) · 897 Bytes
/
ViconVersion.kl
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
/*
* Fabric Core 1.11.4
* Vicon Datastream EDK Sample
*/
struct ViconVersion
{
Integer major;
Integer minor;
Integer point;
};
// constructor using 3 integers
inline ViconVersion(in Integer major, in Integer minor, in Integer point) {
this.major = major;
this.minor = minor;
this.point = point;
}
inline String ViconVersion.asString()
{
return (String(this.major)+"."+String(this.minor)+"."+String(this.point));
}
// equals operator
inline Boolean == (ViconVersion a, ViconVersion b) {
return a.major == b.major && a.minor == b.minor && a.point == b.point;
}
// not equals operator
inline Boolean != (ViconVersion a, ViconVersion b) {
return a.major != b.major || a.minor != b.minor || a.point != b.point;
}
// superior or equal operator
inline Boolean >= (ViconVersion a, ViconVersion b) {
return a.major >= b.major && a.minor >= b.minor && a.point >= b.point;
}