Neodroid  0.2.0
Machine Learning Environment Prototyping Tool
DoubleVector4.cs
Go to the documentation of this file.
1 using System;
2 using UnityEngine;
3 
4 namespace droid.Runtime.Utilities.Structs {
5  [Serializable]
6  public struct DoubleVector4 {
7  [SerializeField] double _X;
8  [SerializeField] double _Y;
9  [SerializeField] double _Z;
10  [SerializeField] double _W;
11 
12  public DoubleVector4(Vector4 vec3) {
13  this._X = vec3.x;
14  this._Y = vec3.y;
15  this._Z = vec3.z;
16  this._W = vec3.w;
17  }
18 
20  a._X += b._X;
21  a._Y += b._Y;
22  a._Z += b._Z;
23  a._W += b._W;
24  return a;
25  }
26 
27  public DoubleVector4(double x, double y, double z, double w) {
28  this._X = x;
29  this._Y = y;
30  this._Z = z;
31  this._W = w;
32  }
33 
34  public Double X { get { return this._X; } set { this._X = value; } }
35 
36  public Double Y { get { return this._Y; } set { this._Y = value; } }
37 
38  public Double Z { get { return this._Z; } set { this._Z = value; } }
39 
40  public Double W { get { return this._W; } set { this._W = value; } }
41 
45  public static DoubleVector4 Zero { get { return new DoubleVector4(0, 0, 0, 0); } }
46  }
47 }
DoubleVector4(double x, double y, double z, double w)
static DoubleVector4 operator+(DoubleVector4 a, DoubleVector4 b)