Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
ReLogic.Utilities.Vector2D Struct Reference

Public Member Functions

 Vector2D (double x, double y)
 
 Vector2D (double value)
 
override bool Equals (object obj)
 
bool Equals (Vector2D other)
 
override int GetHashCode ()
 
double Length ()
 
double LengthSquared ()
 
void Normalize ()
 
override string ToString ()
 
bool Equals (T? other)
 

Static Public Member Functions

static Vector2D Add (Vector2D value1, Vector2D value2)
 
static void Add (ref Vector2D value1, ref Vector2D value2, out Vector2D result)
 
static Vector2D Barycentric (Vector2D value1, Vector2D value2, Vector2D value3, double amount1, double amount2)
 
static void Barycentric (ref Vector2D value1, ref Vector2D value2, ref Vector2D value3, double amount1, double amount2, out Vector2D result)
 
static Vector2D CatmullRom (Vector2D value1, Vector2D value2, Vector2D value3, Vector2D value4, double amount)
 
static void CatmullRom (ref Vector2D value1, ref Vector2D value2, ref Vector2D value3, ref Vector2D value4, double amount, out Vector2D result)
 
static Vector2D Clamp (Vector2D value1, Vector2D min, Vector2D max)
 
static void Clamp (ref Vector2D value1, ref Vector2D min, ref Vector2D max, out Vector2D result)
 
static double Distance (Vector2D value1, Vector2D value2)
 
static void Distance (ref Vector2D value1, ref Vector2D value2, out double result)
 
static double DistanceSquared (Vector2D value1, Vector2D value2)
 
static void DistanceSquared (ref Vector2D value1, ref Vector2D value2, out double result)
 
static Vector2D Divide (Vector2D value1, Vector2D value2)
 
static void Divide (ref Vector2D value1, ref Vector2D value2, out Vector2D result)
 
static Vector2D Divide (Vector2D value1, double divider)
 
static void Divide (ref Vector2D value1, double divider, out Vector2D result)
 
static double Dot (Vector2D value1, Vector2D value2)
 
static void Dot (ref Vector2D value1, ref Vector2D value2, out double result)
 
static Vector2D Hermite (Vector2D value1, Vector2D tangent1, Vector2D value2, Vector2D tangent2, double amount)
 
static void Hermite (ref Vector2D value1, ref Vector2D tangent1, ref Vector2D value2, ref Vector2D tangent2, double amount, out Vector2D result)
 
static Vector2D Lerp (Vector2D value1, Vector2D value2, double amount)
 
static void Lerp (ref Vector2D value1, ref Vector2D value2, double amount, out Vector2D result)
 
static Vector2D Max (Vector2D value1, Vector2D value2)
 
static void Max (ref Vector2D value1, ref Vector2D value2, out Vector2D result)
 
static Vector2D Min (Vector2D value1, Vector2D value2)
 
static void Min (ref Vector2D value1, ref Vector2D value2, out Vector2D result)
 
static Vector2D Multiply (Vector2D value1, Vector2D value2)
 
static Vector2D Multiply (Vector2D value1, double scaleFactor)
 
static void Multiply (ref Vector2D value1, double scaleFactor, out Vector2D result)
 
static void Multiply (ref Vector2D value1, ref Vector2D value2, out Vector2D result)
 
static Vector2D Negate (Vector2D value)
 
static void Negate (ref Vector2D value, out Vector2D result)
 
static Vector2D Normalize (Vector2D value)
 
static void Normalize (ref Vector2D value, out Vector2D result)
 
static Vector2D Reflect (Vector2D vector, Vector2D normal)
 
static void Reflect (ref Vector2D vector, ref Vector2D normal, out Vector2D result)
 
static Vector2D SmoothStep (Vector2D value1, Vector2D value2, double amount)
 
static void SmoothStep (ref Vector2D value1, ref Vector2D value2, double amount, out Vector2D result)
 
static Vector2D Subtract (Vector2D value1, Vector2D value2)
 
static void Subtract (ref Vector2D value1, ref Vector2D value2, out Vector2D result)
 
static Vector2D operator- (Vector2D value)
 
static bool operator== (Vector2D value1, Vector2D value2)
 
static bool operator!= (Vector2D value1, Vector2D value2)
 
static Vector2D operator+ (Vector2D value1, Vector2D value2)
 
static Vector2D operator- (Vector2D value1, Vector2D value2)
 
static Vector2D operator* (Vector2D value1, Vector2D value2)
 
static Vector2D operator* (Vector2D value, double scaleFactor)
 
static Vector2D operator* (double scaleFactor, Vector2D value)
 
static Vector2D operator/ (Vector2D value1, Vector2D value2)
 
static Vector2D operator/ (Vector2D value1, double divider)
 
static double Clamp (double value, double min, double max)
 
static double Lerp (double value1, double value2, double amount)
 
static double SmoothStep (double value1, double value2, double amount)
 
static double Hermite (double value1, double tangent1, double value2, double tangent2, double amount)
 
static double Barycentric (double value1, double value2, double value3, double amount1, double amount2)
 
static double CatmullRom (double value1, double value2, double value3, double value4, double amount)
 

Public Attributes

double X
 
double Y
 

Static Public Attributes

static readonly double DoubleEpsilon = Math.Pow(0.5, 53.0)
 

Properties

static Vector2D Zero [get]
 
static Vector2D One [get]
 
static Vector2D UnitX [get]
 
static Vector2D UnitY [get]
 
string DebugDisplayString [get]
 

Static Private Attributes

static Vector2D zeroVector = new Vector2D(0.0, 0.0)
 
static Vector2D unitVector = new Vector2D(1.0, 1.0)
 
static Vector2D unitXVector = new Vector2D(1.0, 0.0)
 
static Vector2D unitYVector = new Vector2D(0.0, 1.0)
 

Detailed Description

Definition at line 8 of file Vector2D.cs.


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