Class Vector4
A pure .NET implemenation of Unity's Vector4.
See Unity's docs for more details.
Inheritance
System.Object
Vector4
Assembly: Sylves.dll
Syntax
public sealed class Vector4 : ValueType
Constructors
Vector4(Single, Single, Single, Single)
Declaration
public Vector4(float x, float y, float z, float w)
Parameters
Type |
Name |
Description |
System.Single |
x |
|
System.Single |
y |
|
System.Single |
z |
|
System.Single |
w |
|
Properties
Item[Int32]
Declaration
public float this[int index] { get; set; }
Parameters
Type |
Name |
Description |
System.Int32 |
index |
|
Property Value
Type |
Description |
System.Single |
|
magnitude
Declaration
public float magnitude { get; }
Property Value
Type |
Description |
System.Single |
|
negativeInfinity
Declaration
public static Vector4 negativeInfinity { get; }
Property Value
normalized
Declaration
public Vector4 normalized { get; }
Property Value
one
Declaration
public static Vector4 one { get; }
Property Value
positiveInfinity
Declaration
public static Vector4 positiveInfinity { get; }
Property Value
sqrMagnitude
Declaration
public float sqrMagnitude { get; }
Property Value
Type |
Description |
System.Single |
|
w
Declaration
public float w { get; set; }
Property Value
Type |
Description |
System.Single |
|
x
Declaration
public float x { get; set; }
Property Value
Type |
Description |
System.Single |
|
y
Declaration
public float y { get; set; }
Property Value
Type |
Description |
System.Single |
|
z
Declaration
public float z { get; set; }
Property Value
Type |
Description |
System.Single |
|
zero
Declaration
public static Vector4 zero { get; }
Property Value
Methods
Distance(Vector4, Vector4)
Declaration
public static float Distance(Vector4 a, Vector4 b)
Parameters
Returns
Type |
Description |
System.Single |
|
Dot(Vector4, Vector4)
Declaration
public static float Dot(Vector4 a, Vector4 b)
Parameters
Returns
Type |
Description |
System.Single |
|
Equals(Vector4)
Declaration
public bool Equals(Vector4 other)
Parameters
Type |
Name |
Description |
Vector4 |
other |
|
Returns
Type |
Description |
System.Boolean |
|
Equals(Object)
Declaration
public override bool Equals(object other)
Parameters
Type |
Name |
Description |
System.Object |
other |
|
Returns
Type |
Description |
System.Boolean |
|
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type |
Description |
System.Int32 |
|
Lerp(Vector4, Vector4, Single)
Declaration
public static Vector4 Lerp(Vector4 a, Vector4 b, float t)
Parameters
Returns
LerpUnclamped(Vector4, Vector4, Single)
Declaration
public static Vector4 LerpUnclamped(Vector4 a, Vector4 b, float t)
Parameters
Returns
Magnitude(Vector4)
Declaration
public static float Magnitude(Vector4 a)
Parameters
Returns
Type |
Description |
System.Single |
|
Max(Vector4, Vector4)
Declaration
public static Vector4 Max(Vector4 lhs, Vector4 rhs)
Parameters
Returns
Min(Vector4, Vector4)
Declaration
public static Vector4 Min(Vector4 lhs, Vector4 rhs)
Parameters
Returns
MoveTowards(Vector4, Vector4, Single)
Declaration
public static Vector4 MoveTowards(Vector4 current, Vector4 target, float maxDistanceDelta)
Parameters
Type |
Name |
Description |
Vector4 |
current |
|
Vector4 |
target |
|
System.Single |
maxDistanceDelta |
|
Returns
Normalize()
Declaration
Normalize(Vector4)
Declaration
public static Vector4 Normalize(Vector4 a)
Parameters
Returns
Project(Vector4, Vector4)
Declaration
public static Vector4 Project(Vector4 a, Vector4 b)
Parameters
Returns
Scale(Vector4)
Declaration
public void Scale(Vector4 scale)
Parameters
Type |
Name |
Description |
Vector4 |
scale |
|
Scale(Vector4, Vector4)
Declaration
public static Vector4 Scale(Vector4 a, Vector4 b)
Parameters
Returns
Set(Single, Single, Single, Single)
Declaration
public void Set(float newX, float newY, float newZ, float newW)
Parameters
Type |
Name |
Description |
System.Single |
newX |
|
System.Single |
newY |
|
System.Single |
newZ |
|
System.Single |
newW |
|
SqrMagnitude()
Declaration
public float SqrMagnitude()
Returns
Type |
Description |
System.Single |
|
SqrMagnitude(Vector4)
Declaration
public static float SqrMagnitude(Vector4 a)
Parameters
Returns
Type |
Description |
System.Single |
|
ToString()
Declaration
public override string ToString()
Returns
Type |
Description |
System.String |
|
ToString(String)
Declaration
public string ToString(string format)
Parameters
Type |
Name |
Description |
System.String |
format |
|
Returns
Type |
Description |
System.String |
|
Operators
Addition(Vector4, Vector4)
Declaration
public static Vector4 operator +(Vector4 a, Vector4 b)
Parameters
Returns
Division(Vector4, Single)
Declaration
public static Vector4 operator /(Vector4 a, float b)
Parameters
Type |
Name |
Description |
Vector4 |
a |
|
System.Single |
b |
|
Returns
Equality(Vector4, Vector4)
Declaration
public static bool operator ==(Vector4 lhs, Vector4 rhs)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Inequality(Vector4, Vector4)
Declaration
public static bool operator !=(Vector4 lhs, Vector4 rhs)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Multiply(Vector4, Vector4)
Declaration
public static Vector4 operator *(Vector4 a, Vector4 b)
Parameters
Returns
Multiply(Vector4, Single)
Declaration
public static Vector4 operator *(Vector4 a, float b)
Parameters
Type |
Name |
Description |
Vector4 |
a |
|
System.Single |
b |
|
Returns
Multiply(Single, Vector4)
Declaration
public static Vector4 operator *(float a, Vector4 b)
Parameters
Type |
Name |
Description |
System.Single |
a |
|
Vector4 |
b |
|
Returns
Subtraction(Vector4, Vector4)
Declaration
public static Vector4 operator -(Vector4 a, Vector4 b)
Parameters
Returns
UnaryNegation(Vector4)
Declaration
public static Vector4 operator -(Vector4 a)
Parameters
Returns