Struct LunyVector2
- Namespace
- Luny.Engine.Bridge
- Assembly
- Luny.dll
public struct LunyVector2
Constructors
LunyVector2(double, double)
public LunyVector2(double x, double y)
Parameters
x double
y double
LunyVector2(float, float)
public LunyVector2(float x, float y)
Parameters
x float
y float
Properties
Down
public static LunyVector2 Down { get; }
Property Value
- LunyVector2
this[int]
public float this[int index] { get; set; }
Parameters
index int
Property Value
- float
Left
public static LunyVector2 Left { get; }
Property Value
- LunyVector2
Magnitude
public float Magnitude { get; }
Property Value
- float
NegativeInfinity
public static LunyVector2 NegativeInfinity { get; }
Property Value
- LunyVector2
Normalized
public LunyVector2 Normalized { get; }
Property Value
- LunyVector2
One
public static LunyVector2 One { get; }
Property Value
- LunyVector2
PositiveInfinity
public static LunyVector2 PositiveInfinity { get; }
Property Value
- LunyVector2
Right
public static LunyVector2 Right { get; }
Property Value
- LunyVector2
SqrMagnitude
public float SqrMagnitude { get; }
Property Value
- float
Up
public static LunyVector2 Up { get; }
Property Value
- LunyVector2
X
public float X { get; set; }
Property Value
- float
Y
public float Y { get; set; }
Property Value
- float
Zero
public static LunyVector2 Zero { get; }
Property Value
- LunyVector2
Methods
Angle(LunyVector2, LunyVector2)
public static float Angle(LunyVector2 from, LunyVector2 to)
Parameters
from LunyVector2
to LunyVector2
Returns
- float
ClampMagnitude(LunyVector2, double)
public static LunyVector2 ClampMagnitude(LunyVector2 vector, double maxLength)
Parameters
vector LunyVector2
maxLength double
Returns
- LunyVector2
ClampMagnitude(LunyVector2, float)
public static LunyVector2 ClampMagnitude(LunyVector2 vector, float maxLength)
Parameters
vector LunyVector2
maxLength float
Returns
- LunyVector2
Distance(LunyVector2, LunyVector2)
public static float Distance(LunyVector2 a, LunyVector2 b)
Parameters
a LunyVector2
b LunyVector2
Returns
- float
Dot(LunyVector2, LunyVector2)
public static float Dot(LunyVector2 lhs, LunyVector2 rhs)
Parameters
lhs LunyVector2
rhs LunyVector2
Returns
- float
Equals(LunyVector2)
public bool Equals(LunyVector2 other)
Parameters
other LunyVector2
Returns
- bool
Equals(object)
public override bool Equals(object obj)
Parameters
obj object
Returns
- bool
GetHashCode()
public override int GetHashCode()
Returns
- int
Lerp(LunyVector2, LunyVector2, double)
public static LunyVector2 Lerp(LunyVector2 a, LunyVector2 b, double t)
Parameters
a LunyVector2
b LunyVector2
t double
Returns
- LunyVector2
Lerp(LunyVector2, LunyVector2, float)
public static LunyVector2 Lerp(LunyVector2 a, LunyVector2 b, float t)
Parameters
a LunyVector2
b LunyVector2
t float
Returns
- LunyVector2
LerpUnclamped(LunyVector2, LunyVector2, double)
public static LunyVector2 LerpUnclamped(LunyVector2 a, LunyVector2 b, double t)
Parameters
a LunyVector2
b LunyVector2
t double
Returns
- LunyVector2
LerpUnclamped(LunyVector2, LunyVector2, float)
public static LunyVector2 LerpUnclamped(LunyVector2 a, LunyVector2 b, float t)
Parameters
a LunyVector2
b LunyVector2
t float
Returns
- LunyVector2
Max(LunyVector2, LunyVector2)
public static LunyVector2 Max(LunyVector2 lhs, LunyVector2 rhs)
Parameters
lhs LunyVector2
rhs LunyVector2
Returns
- LunyVector2
Min(LunyVector2, LunyVector2)
public static LunyVector2 Min(LunyVector2 lhs, LunyVector2 rhs)
Parameters
lhs LunyVector2
rhs LunyVector2
Returns
- LunyVector2
MoveTowards(LunyVector2, LunyVector2, double)
public static LunyVector2 MoveTowards(LunyVector2 current, LunyVector2 target, double maxDistanceDelta)
Parameters
current LunyVector2
target LunyVector2
maxDistanceDelta double
Returns
- LunyVector2
MoveTowards(LunyVector2, LunyVector2, float)
public static LunyVector2 MoveTowards(LunyVector2 current, LunyVector2 target, float maxDistanceDelta)
Parameters
current LunyVector2
target LunyVector2
maxDistanceDelta float
Returns
- LunyVector2
Normalize()
Normalize(LunyVector2)
public static LunyVector2 Normalize(LunyVector2 value)
Parameters
value LunyVector2
Returns
- LunyVector2
Perpendicular(LunyVector2)
public static LunyVector2 Perpendicular(LunyVector2 inDirection)
Parameters
inDirection LunyVector2
Returns
- LunyVector2
Reflect(LunyVector2, LunyVector2)
public static LunyVector2 Reflect(LunyVector2 inDirection, LunyVector2 inNormal)
Parameters
inDirection LunyVector2
inNormal LunyVector2
Returns
- LunyVector2
Scale(LunyVector2)
public void Scale(LunyVector2 scale)
Parameters
scale LunyVector2
Scale(LunyVector2, LunyVector2)
public static LunyVector2 Scale(LunyVector2 a, LunyVector2 b)
Parameters
a LunyVector2
b LunyVector2
Returns
- LunyVector2
Set(float, float)
public void Set(float newX, float newY)
Parameters
newX float
newY float
SignedAngle(LunyVector2, LunyVector2)
public static float SignedAngle(LunyVector2 from, LunyVector2 to)
Parameters
from LunyVector2
to LunyVector2
Returns
- float
SqrDistance(LunyVector2, LunyVector2)
public static float SqrDistance(LunyVector2 a, LunyVector2 b)
Parameters
a LunyVector2
b LunyVector2
Returns
- float
ToString()
public override string ToString()
Returns
- string
ToString(string)
public string ToString(string format)
Parameters
format string
Returns
- string
Operators
operator +(LunyVector2, LunyVector2)
public static LunyVector2 operator +(LunyVector2 a, LunyVector2 b)
Parameters
a LunyVector2
b LunyVector2
Returns
- LunyVector2
operator /(LunyVector2, LunyVector2)
public static LunyVector2 operator /(LunyVector2 a, LunyVector2 b)
Parameters
a LunyVector2
b LunyVector2
Returns
- LunyVector2
operator /(LunyVector2, double)
public static LunyVector2 operator /(LunyVector2 a, double d)
Parameters
a LunyVector2
d double
Returns
- LunyVector2
operator /(LunyVector2, float)
public static LunyVector2 operator /(LunyVector2 a, float d)
Parameters
a LunyVector2
d float
Returns
- LunyVector2
operator ==(LunyVector2, LunyVector2)
public static bool operator ==(LunyVector2 lhs, LunyVector2 rhs)
Parameters
lhs LunyVector2
rhs LunyVector2
Returns
- bool
explicit operator LunyVector2(LunyVector3)
public static explicit operator LunyVector2(LunyVector3 v)
Parameters
v LunyVector3
Returns
- LunyVector2
implicit operator LunyVector3(LunyVector2)
public static implicit operator LunyVector3(LunyVector2 v)
Parameters
v LunyVector2
Returns
- LunyVector3
operator !=(LunyVector2, LunyVector2)
public static bool operator !=(LunyVector2 lhs, LunyVector2 rhs)
Parameters
lhs LunyVector2
rhs LunyVector2
Returns
- bool
operator *(LunyVector2, LunyVector2)
public static LunyVector2 operator *(LunyVector2 a, LunyVector2 b)
Parameters
a LunyVector2
b LunyVector2
Returns
- LunyVector2
operator *(LunyVector2, double)
public static LunyVector2 operator *(LunyVector2 a, double d)
Parameters
a LunyVector2
d double
Returns
- LunyVector2
operator *(LunyVector2, float)
public static LunyVector2 operator *(LunyVector2 a, float d)
Parameters
a LunyVector2
d float
Returns
- LunyVector2
operator *(double, LunyVector2)
public static LunyVector2 operator *(double d, LunyVector2 a)
Parameters
d double
a LunyVector2
Returns
- LunyVector2
operator *(float, LunyVector2)
public static LunyVector2 operator *(float d, LunyVector2 a)
Parameters
d float
a LunyVector2
Returns
- LunyVector2
operator -(LunyVector2, LunyVector2)
public static LunyVector2 operator -(LunyVector2 a, LunyVector2 b)
Parameters
a LunyVector2
b LunyVector2
Returns
- LunyVector2
operator -(LunyVector2)
public static LunyVector2 operator -(LunyVector2 a)
Parameters
a LunyVector2
Returns
- LunyVector2