Struct Vector4F
Vector4F structure
Vector with 4 float parameters
public struct Vector4F : IEquatable<Vector4F>
Constructors
| Name | Description |
|---|
| Vector4F(Color) | Initializes a new instance of the Vector4F struct. |
| Vector4F(float) | Initializes a new instance of the Vector4F struct. |
| Vector4F(Vector4F) | Initializes a new instance of the Vector4F struct. |
| Vector4F(float, float, float, float) | Initializes a new instance of the Vector4F struct. |
Properties
| Name | Description |
|---|
| 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
| Name | Description |
|---|
| static Zero() | Creates vector with (0, 0, 0). |
| override 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. |
| override 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. |
| operator + | Adds two vectors together. |
| operator / | Divides vector by scalar value. |
| 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 * | Multiplies vector by scalar value. |
| operator - | Subtracts the second vector from the first. |
Fields
| Name | Description |
|---|
| W | W coordinate |
| X | X coordinate |
| Y | Y coordinate |
| Z | Z coordinate |
See Also