Class Vec4f
- Namespace
- Vintagestory.API.MathTools
- Assembly
- VintagestoryAPI.dll
public class Vec4f
- Inheritance
-
Vec4f
- Inherited Members
- Extension Methods
Constructors
Vec4f()
public Vec4f()
Vec4f(float, float, float, float)
public Vec4f(float x, float y, float z, float w)
Parameters
Fields
W
public float W
Field Value
X
public float X
Field Value
Y
public float Y
Field Value
Z
public float Z
Field Value
Properties
A
Synonum for W
public float A { get; set; }
Property Value
B
Synonum for Z
public float B { get; set; }
Property Value
G
Synonum for Y
public float G { get; set; }
Property Value
this[int]
Returns the n-th coordinate
public float this[int index] { get; set; }
Parameters
index
int
Property Value
R
Synonum for X
public float R { get; set; }
Property Value
XYZ
public Vec3f XYZ { get; }
Property Value
Methods
Clone()
public Vec4f Clone()
Returns
LengthXYZ()
Returns the length of this vector
public float LengthXYZ()
Returns
Mul(Vec4f)
public Vec4f Mul(Vec4f vec)
Parameters
vec
Vec4f
Returns
NormalizeXYZ()
Turns the vector into a unit vector with length 1, but only if length is non-zero
public Vec4f NormalizeXYZ()
Returns
Set(float, float, float, float)
public Vec4f Set(float x, float y, float z, float w)
Parameters
Returns
Set(float[])
public Vec4f Set(float[] vec)
Parameters
vec
float[]
Returns
Set(Vec4f)
public Vec4f Set(Vec4f vec)
Parameters
vec
Vec4f
Returns
Operators
operator +(Vec4f, float)
public static Vec4f operator +(Vec4f left, float right)
Parameters
Returns
operator +(Vec4f, Vec4f)
public static Vec4f operator +(Vec4f left, Vec4f right)
Parameters
Returns
operator +(Vec4f, Vec4i)
public static Vec4f operator +(Vec4f left, Vec4i right)
Parameters
Returns
operator /(Vec4f, float)
public static Vec4f operator /(Vec4f left, float right)
Parameters
Returns
operator *(float, Vec4f)
public static Vec4f operator *(float left, Vec4f right)
Parameters
Returns
operator *(Vec4f, float)
public static Vec4f operator *(Vec4f left, float right)
Parameters
Returns
operator *(Vec4f, Vec4f)
public static double operator *(Vec4f left, Vec4f right)
Parameters
Returns
operator -(float, Vec4f)
public static Vec4f operator -(float left, Vec4f right)
Parameters
Returns
operator -(Vec4f, float)
public static Vec4f operator -(Vec4f left, float right)
Parameters
Returns
operator -(Vec4f, Vec4f)
public static Vec4f operator -(Vec4f left, Vec4f right)