![]() |
SystemEX
Lacking
Additional generic collection types missing in .net
|
Public Member Functions | |
| Vec4d () | |
| Initializes a zero vector (0,0). | |
| Vec4d (double _x, double _y, double _z, double _w) | |
| Initializes a vector with explicit X Y Z W values. | |
| Vec4d (double _f) | |
| Initializes both components with the same value. | |
| Vec4d (Vec4d vec) | |
| Copy constructor. | |
| Vec4d (double[] lpvec) | |
| Initializes the vector from a double array. | |
| double | Get (int index) |
| Gets a component by index (0 = X, 1 = Y). | |
| override int | GetHashCode () |
| Computes a hash code for this vector. | |
| int | CompareTo (object? obj) |
| Compares this vector to another object. | |
| CompareResult | CompareTo (Vec4d a) |
| Compares two vectors lexicographically. | |
| bool | Equals (Vec4d other) |
| Determines whether this instance is equal to another Half16 value, using the same semantics as the operator ==(Vec4d,Vec4d). | |
| override bool | Equals (object? obj) |
| Determines whether this instance is equal to another object. | |
| int IComparable< Vec4d >. | CompareTo (Vec4d other) |
| FixedVector< byte > | ToBytes () |
| Converts the vector into a deterministic byte sequence. | |
| Public Member Functions inherited from SystemEx.IComparableEx< T > | |
| CompareResult | CompareTo (T a) |
| Compares this instance with the specified value and returns a CompareResult describing the relationship between them. | |
Static Public Member Functions | |
| static double | Lenght (Vec4d v) |
| Computes the squared length of the vector. | |
| static double | LenghtSqrt (Vec4d v) |
| Computes the Euclidean length of the vector. | |
| static double | Dot (Vec4d v1, Vec4d v2) |
| Computes the dot product of two vectors. | |
| static double | Angle (Vec4d v1, Vec4d v2) |
| Computes the angle between two vectors. | |
| static Vec4d | InterpolateCoords (Vec4d v1, Vec4d v2, double p) |
| Linearly interpolates between two vectors. | |
| static Vec4d | InterpolateNormal (Vec4d v1, Vec4d v2, double p) |
| Interpolates and normalizes the result. | |
| static bool | NearEqual (Vec4d v1, Vec4d v2, double epsilon) |
| Checks whether two vectors are approximately equal. | |
| static Vec4d | Normalize (Vec4d v, bool ex=false) |
| Normalizes the vector. | |
| static Vec4d | operator+ (Vec4d a, Vec4d b) |
| Adds two vectors component‑wise. | |
| static Vec4d | operator- (Vec4d a, Vec4d b) |
| Subtracts two vectors component‑wise. | |
| static Vec4d | operator/ (Vec4d a, Vec4d b) |
| Divides two vectors component‑wise. | |
| static Vec4d | operator* (Vec4d a, Vec4d b) |
| Multiplies two vectors component‑wise. | |
| static Vec4d | operator+ (Vec4d a, double b) |
| Adds a scalar to both components of the vector. | |
| static Vec4d | operator- (Vec4d a, double b) |
| Subtracts a scalar from both components of the vector. | |
| static Vec4d | operator/ (Vec4d a, double b) |
| Divides both components of the vector by a scalar. | |
| static Vec4d | operator* (Vec4d a, double b) |
| static Vec4d | operator- (double a, Vec4d b) |
| Subtracts each component of the vector from a scalar. | |
| static Vec4d | operator/ (double a, Vec4d b) |
| static Vec4d | operator* (double a, Vec4d b) |
| Multiplies a scalar with each component of the vector. | |
| static Vec4d | operator+ (double a, Vec4d b) |
| Adds a scalar to each component of the vector. | |
| static bool | operator== (Vec4d a, Vec4d b) |
| Determines whether two vectors are equal component‑wise. | |
| static bool | operator!= (Vec4d a, Vec4d b) |
| Determines whether two vectors differ in any component. | |
| static bool | operator<= (Vec4d a, Vec4d b) |
| Determines whether all components of a are less than or equal to those of b . | |
| static bool | operator>= (Vec4d a, Vec4d b) |
| Determines whether all components of a are greater than or equal to those of b . | |
| static bool | operator< (Vec4d a, Vec4d b) |
| Determines whether all components of a are strictly less than those of b . | |
| static bool | operator> (Vec4d a, Vec4d b) |
| Determines whether all components of a are strictly greater than those of b . | |
| static bool | operator== (double a, Vec4d b) |
| Determines whether a scalar equals both components of the vector. | |
| static bool | operator!= (double a, Vec4d b) |
| Determines whether a scalar differs from any component of the vector. | |
| static bool | operator<= (double a, Vec4d b) |
| Determines whether a scalar is less than or equal to both vector components. | |
| static bool | operator>= (double a, Vec4d b) |
| Determines whether a scalar is greater than or equal to both vector components. | |
| static bool | operator< (double a, Vec4d b) |
| Determines whether a scalar is strictly less than both vector components. | |
| static bool | operator> (double a, Vec4d b) |
| Determines whether a scalar is strictly greater than both vector components. | |
| static bool | operator== (Vec4d a, double b) |
| Determines whether both vector components equal the scalar. | |
| static bool | operator!= (Vec4d a, double b) |
| Determines whether any vector component differs from the scalar. | |
| static bool | operator<= (Vec4d a, double b) |
| Determines whether both vector components are less than or equal to the scalar. | |
| static bool | operator>= (Vec4d a, double b) |
| Determines whether both vector components are greater than or equal to the scalar. | |
| static bool | operator< (Vec4d a, double b) |
| Determines whether both vector components are strictly less than the scalar. | |
| static bool | operator> (Vec4d a, double b) |
| Determines whether both vector components are strictly greater than the scalar. | |
Static Public Attributes | |
| static readonly Vec4d | Zero = new Vec4d(0) |
| Represents Vector(0,0,0). | |
| static readonly Vec4d | One = new Vec4d(1f) |
| Represents Vector(1,1,1). | |
| static readonly Vec4d | NegativeOne = new Vec4d(-1f) |
| Represents Vector(-1,-1,-1). | |
| static readonly Vec4d | Min = new Vec4d(double.MinValue) |
| Represents Vector(MIN,MIN,MIN). | |
| static readonly Vec4d | Max = new Vec4d(double.MaxValue) |
| Represents Vector(MAX,MAX,MAX). | |
Properties | |
| int | Count [get] |
| Gets the number of components in this vector (always 4). | |
| double | X [get, set] |
| Gets or sets the X component. | |
| double | Y [get, set] |
| Gets or sets the Y component. | |
| double | Z [get, set] |
| Gets or sets the Z component. | |
| double | W [get, set] |
| Gets or sets the W component. | |
| SystemEx.Numeric.Vec4d.Vec4d | ( | ) |
Initializes a zero vector (0,0).
| SystemEx.Numeric.Vec4d.Vec4d | ( | double | _x, |
| double | _y, | ||
| double | _z, | ||
| double | _w ) |
Initializes a vector with explicit X Y Z W values.
| SystemEx.Numeric.Vec4d.Vec4d | ( | double | _f | ) |
Initializes both components with the same value.
| SystemEx.Numeric.Vec4d.Vec4d | ( | Vec4d | vec | ) |
Copy constructor.
| SystemEx.Numeric.Vec4d.Vec4d | ( | double[] | lpvec | ) |
Initializes the vector from a double array.
Computes the angle between two vectors.
| int SystemEx.Numeric.Vec4d.CompareTo | ( | object? | obj | ) |
Compares this vector to another object.
| CompareResult SystemEx.Numeric.Vec4d.CompareTo | ( | Vec4d | a | ) |
Compares two vectors lexicographically.
Computes the dot product of two vectors.
| override bool SystemEx.Numeric.Vec4d.Equals | ( | object? | obj | ) |
Determines whether this instance is equal to another object.
The object is considered equal if it is a Vec4d and compares equal using Equals(Vec4d).
| obj | The object to compare with. |
true if obj is a Vec4d and equal to this instance; otherwise false. | bool SystemEx.Numeric.Vec4d.Equals | ( | Vec4d | other | ) |
Determines whether this instance is equal to another Half16 value, using the same semantics as the operator ==(Vec4d,Vec4d).
| other | The value to compare with. |
true if the values are equal; otherwise false. | double SystemEx.Numeric.Vec4d.Get | ( | int | index | ) |
Gets a component by index (0 = X, 1 = Y).
| override int SystemEx.Numeric.Vec4d.GetHashCode | ( | ) |
Computes a hash code for this vector.
The primary hash is generated using HashFactory and the HashAlgorithmAttribute applied to this struct.
If hashing fails (rare), a fallback XOR‑based hash is used.
Linearly interpolates between two vectors.
Interpolates and normalizes the result.
|
static |
Computes the squared length of the vector.
|
static |
Computes the Euclidean length of the vector.
Normalizes the vector.
|
static |
Determines whether a scalar differs from any component of the vector.
|
static |
Determines whether any vector component differs from the scalar.
Determines whether two vectors differ in any component.
Multiplies a scalar with each component of the vector.
Multiplies both components of the vector by a scalar.
Multiplies two vectors component‑wise.
Adds a scalar to each component of the vector.
Adds a scalar to both components of the vector.
Adds two vectors component‑wise.
Subtracts each component of the vector from a scalar.
Subtracts a scalar from both components of the vector.
Subtracts two vectors component‑wise.
Divides a scalar by each component of the vector.
Divides both components of the vector by a scalar.
Divides two vectors component‑wise.
|
static |
Determines whether a scalar is strictly less than both vector components.
|
static |
Determines whether both vector components are strictly less than the scalar.
Determines whether all components of a are strictly less than those of b .
|
static |
Determines whether a scalar is less than or equal to both vector components.
|
static |
Determines whether both vector components are less than or equal to the scalar.
Determines whether all components of a are less than or equal to those of b .
|
static |
Determines whether a scalar equals both components of the vector.
|
static |
Determines whether both vector components equal the scalar.
Determines whether two vectors are equal component‑wise.
|
static |
Determines whether a scalar is strictly greater than both vector components.
|
static |
Determines whether both vector components are strictly greater than the scalar.
Determines whether all components of a are strictly greater than those of b .
|
static |
Determines whether a scalar is greater than or equal to both vector components.
|
static |
Determines whether both vector components are greater than or equal to the scalar.
Determines whether all components of a are greater than or equal to those of b .
| FixedVector< byte > SystemEx.Numeric.Vec4d.ToBytes | ( | ) |
Converts the vector into a deterministic byte sequence.
This method is used by HashFactory to compute attribute‑driven hashes. The byte layout is stable and platform‑safe, ensuring consistent hashing across devices and backends.
Implements SystemEx.Hash.IHashable< T >.
Represents Vector(MAX,MAX,MAX).
Represents Vector(MIN,MIN,MIN).
Represents Vector(-1,-1,-1).
|
get |
Gets the number of components in this vector (always 4).
|
getset |
Gets or sets the W component.
|
getset |
Gets or sets the X component.
|
getset |
Gets or sets the Y component.
|
getset |
Gets or sets the Z component.