Empeld Empeld plugin documentation.
pluginbase.Helpers.Coords.Rotation2d Struct Reference

## Public Member Functions

Rotation2d (double x, double z)

override string ToString ()

## Static Public Member Functions

static Rotation2d FromDegrees (double x, double z)

static Rotation2d FromDirectionZUp (Vector3d dir)

static implicit operator Vector2d (Rotation2d rot)

static operator Rotation2d (Vector2d vec)

static implicit operator Rotation2d (Rotation2 rot)

static operator Rotation2 (Rotation2d rot)

static Rotation2d operator+ (Rotation2d a, Rotation2d b)

static Rotation2d operator- (Rotation2d a, Rotation2d b)

static Rotation2d operator* (Rotation2d a, Rotation2d b)

static Rotation2d operator/ (Rotation2d a, Rotation2d b)

static Rotation2d operator* (Rotation2d a, double v)

static Rotation2d operator* (double v, Rotation2d b)

double X

double Z

## Static Public Attributes

static readonly Rotation2d Zero = new Rotation2d(0.0, 0.0)

static readonly Rotation2d UnitX = new Rotation2d(1.0, 0.0)

static readonly Rotation2d UnitZ = new Rotation2d(0.0, 1.0)

## Properties

double DegreesX` [get]`

double DegreesZ` [get]`

Vector3d Vector` [get]`

Vector3d VectorZAxis` [get]`

## Constructor & Destructor Documentation

 pluginbase.Helpers.Coords.Rotation2d.Rotation2d ( double x, double z )
17  {
18  X = x;
19  Z = z;
20  }
double X
Definition: Rotation2d.cs:12
double Z
Definition: Rotation2d.cs:12

## Member Function Documentation

 static Rotation2d pluginbase.Helpers.Coords.Rotation2d.FromDegrees ( double x, double z )
static
23  {
25  }
Definition: MathExtensions.cs:232
Math extensions
Definition: MathExtensions.cs:7
Rotation2d(double x, double z)
Definition: Rotation2d.cs:16
 static Rotation2d pluginbase.Helpers.Coords.Rotation2d.FromDirectionZUp ( Vector3d dir )
static
28  {
29  return new Rotation2d(
30  Math.Asin(dir.Z),
31  Math.Atan2(dir.X, dir.Y)
32  );
33  }
Rotation2d(double x, double z)
Definition: Rotation2d.cs:16
 static pluginbase.Helpers.Coords.Rotation2d.operator Rotation2 ( Rotation2d rot )
explicitstatic
99  {
100  return new Rotation2((float)rot.X, (float)rot.Z);
101  }
 static pluginbase.Helpers.Coords.Rotation2d.operator Rotation2d ( Vector2d vec )
explicitstatic
89  {
90  return new Rotation2d(vec.X, vec.Y);
91  }
Rotation2d(double x, double z)
Definition: Rotation2d.cs:16
 static implicit pluginbase.Helpers.Coords.Rotation2d.operator Rotation2d ( Rotation2 rot )
static
94  {
95  return new Rotation2d(rot.X, rot.Z);
96  }
Rotation2d(double x, double z)
Definition: Rotation2d.cs:16
 static implicit pluginbase.Helpers.Coords.Rotation2d.operator Vector2d ( Rotation2d rot )
static
84  {
85  return new Vector2d(rot.X, rot.Z);
86  }
 static Rotation2d pluginbase.Helpers.Coords.Rotation2d.operator* ( Rotation2d a, Rotation2d b )
static
116  {
117  return new Rotation2d(a.X * b.X, a.Z * b.Z);
118  }
Rotation2d(double x, double z)
Definition: Rotation2d.cs:16
 static Rotation2d pluginbase.Helpers.Coords.Rotation2d.operator* ( Rotation2d a, double v )
static
126  {
127  return new Rotation2d(a.X*v, a.Z*v);
128  }
Rotation2d(double x, double z)
Definition: Rotation2d.cs:16
 static Rotation2d pluginbase.Helpers.Coords.Rotation2d.operator* ( double v, Rotation2d b )
static
131  {
132  return new Rotation2d(v*b.X, v*b.Z);
133  }
Rotation2d(double x, double z)
Definition: Rotation2d.cs:16
 static Rotation2d pluginbase.Helpers.Coords.Rotation2d.operator+ ( Rotation2d a, Rotation2d b )
static
106  {
107  return new Rotation2d(a.X + b.X, a.Z + b.Z);
108  }
Rotation2d(double x, double z)
Definition: Rotation2d.cs:16
 static Rotation2d pluginbase.Helpers.Coords.Rotation2d.operator- ( Rotation2d a, Rotation2d b )
static
111  {
112  return new Rotation2d(a.X - b.X, a.Z - b.Z);
113  }
Rotation2d(double x, double z)
Definition: Rotation2d.cs:16
 static Rotation2d pluginbase.Helpers.Coords.Rotation2d.operator/ ( Rotation2d a, Rotation2d b )
static
121  {
122  return new Rotation2d(a.X/b.X, a.Z/b.Z);
123  }
Rotation2d(double x, double z)
Definition: Rotation2d.cs:16
 override string pluginbase.Helpers.Coords.Rotation2d.ToString ( )
139  {
140  return string.Format("({0}, {1})", X, Z);
141  }
double X
Definition: Rotation2d.cs:12
double Z
Definition: Rotation2d.cs:12

## Member Data Documentation

 readonly Rotation2d pluginbase.Helpers.Coords.Rotation2d.UnitX = new Rotation2d(1.0, 0.0)
static
 readonly Rotation2d pluginbase.Helpers.Coords.Rotation2d.UnitZ = new Rotation2d(0.0, 1.0)
static
 double pluginbase.Helpers.Coords.Rotation2d.X
 double pluginbase.Helpers.Coords.Rotation2d.Z
 readonly Rotation2d pluginbase.Helpers.Coords.Rotation2d.Zero = new Rotation2d(0.0, 0.0)
static

## Property Documentation

 double pluginbase.Helpers.Coords.Rotation2d.DegreesX
get
 double pluginbase.Helpers.Coords.Rotation2d.DegreesZ
get
 Vector3d pluginbase.Helpers.Coords.Rotation2d.Vector
get
 Vector3d pluginbase.Helpers.Coords.Rotation2d.VectorZAxis
get

The documentation for this struct was generated from the following file: