Vector4F

Vector4F struct

Vector with 4 float parameters

public struct Vector4F : IEquatable<Vector4F>

Constructors

NameDescription
Vector4F(float)Initializes a new instance of the Vector4F struct.

Properties

NameDescription
A { get; set; }Alpha component
B { get; set; }Blue component
G { get; set; }Green component
Item { get; }Gets a coordinate at the specified index.
Length { get; }Length
R { get; set; }Red component
SquareLength { get; }Square length

Methods

NameDescription
Equals(object)Returns a boolean indicating whether the given Object is equal to this Vector4F instance.
Equals(Vector4F)Returns a boolean indicating whether the given Vector4F is equal to this Vector4F instance.
GetHashCode()Returns the hash code for this instance.
Normalized()Creates normilized vector.
SafeNormalized()Creates normilized vector safely(returns self if length is zero).
ToVector2F()Creates Vector2F.
ToVector3F()Creates Vector3F.
Zero()Creates vector with (0, 0, 0).

Fields

NameDescription
WW coordinate
XX coordinate
YY coordinate
ZZ coordinate

Operators

NameDescription
operator ==Returns a boolean indicating whether the two given vectors are equal.
operator !=Returns a boolean indicating whether the two given vectors are not equal.
operator -Subtracts the second vector from the first.
operator +Adds two vectors together.
operator *Multiplies vector by scalar value.
operator /Divides vector by scalar value.

See Also