Table of Contents

Struct Vector4d

Namespace
FixedMathSharp
Assembly
FixedMathSharp.dll

Represents a 4D vector with fixed-point precision.

[MemoryPackable(GenerateType.Object)]
public struct Vector4d : IEquatable<Vector4d>, IComparable<Vector4d>, IEqualityComparer<Vector4d>, ISpanFormattable, IFormattable, IMemoryPackable<Vector4d>, IMemoryPackFormatterRegister
Implements
IMemoryPackable<Vector4d>
IMemoryPackFormatterRegister
Inherited Members
Extension Methods

Remarks

This type is useful for generic 4D component math and homogeneous coordinates used by 4x4 transforms. It does not define independent forward or backward semantics; direction naming belongs to Vector2d, Vector3d, and adapter-level convention code.

Constructors

Vector4d(Fixed64)

Initializes a new Vector4d with all components set to the same value.

public Vector4d(Fixed64 value)

Parameters

value Fixed64

Vector4d(Fixed64, Fixed64, Fixed64, Fixed64)

Initializes a new Vector4d using the specified components.

[JsonConstructor]
public Vector4d(Fixed64 x, Fixed64 y, Fixed64 z, Fixed64 w)

Parameters

x Fixed64
y Fixed64
z Fixed64
w Fixed64

Vector4d(Vector2d, Fixed64, Fixed64)

Initializes a new Vector4d from a Vector2d plus Z and W components.

public Vector4d(Vector2d value, Fixed64 z, Fixed64 w)

Parameters

value Vector2d
z Fixed64
w Fixed64

Vector4d(Vector3d, Fixed64)

Initializes a new Vector4d from a Vector3d plus a W component.

public Vector4d(Vector3d value, Fixed64 w)

Parameters

value Vector3d
w Fixed64

Vector4d(int, int, int, int)

Initializes a new Vector4d using integer component values.

public Vector4d(int xInt, int yInt, int zInt, int wInt)

Parameters

xInt int
yInt int
zInt int
wInt int

Fields

W

The W component of the vector.

[JsonInclude]
[MemoryPackOrder(3)]
public Fixed64 W

Field Value

Fixed64

X

The X component of the vector.

[JsonInclude]
[MemoryPackOrder(0)]
public Fixed64 X

Field Value

Fixed64

Y

The Y component of the vector.

[JsonInclude]
[MemoryPackOrder(1)]
public Fixed64 Y

Field Value

Fixed64

Z

The Z component of the vector.

[JsonInclude]
[MemoryPackOrder(2)]
public Fixed64 Z

Field Value

Fixed64

Properties

IsZero

Are all components of this vector equal to zero?

[JsonIgnore]
[MemoryPackIgnore]
public readonly bool IsZero { get; }

Property Value

bool

this[int]

Gets or sets the vector component at the specified index.

[JsonIgnore]
[MemoryPackIgnore]
public Fixed64 this[int index] { readonly get; set; }

Parameters

index int

Property Value

Fixed64

LongStateHash

Returns a long hash of the vector based on its component values.

[JsonIgnore]
[MemoryPackIgnore]
public readonly long LongStateHash { get; }

Property Value

long

Magnitude

Returns the actual length of this vector.

[JsonIgnore]
[MemoryPackIgnore]
public readonly Fixed64 Magnitude { get; }

Property Value

Fixed64

MagnitudeSquared

Returns the square magnitude of the vector.

[JsonIgnore]
[MemoryPackIgnore]
public readonly Fixed64 MagnitudeSquared { get; }

Property Value

Fixed64

Negative

(-1, -1, -1, -1)

public static Vector4d Negative { get; }

Property Value

Vector4d

Normalized

Normalizes the given vector, returning a unit vector with the same direction.

[JsonIgnore]
[MemoryPackIgnore]
public readonly Vector4d Normalized { get; }

Property Value

Vector4d

One

(1, 1, 1, 1)

public static Vector4d One { get; }

Property Value

Vector4d

StateHash

Returns a hash of the vector based on its state.

[JsonIgnore]
[MemoryPackIgnore]
public readonly int StateHash { get; }

Property Value

int

UnitW

(0, 0, 0, 1)

public static Vector4d UnitW { get; }

Property Value

Vector4d

UnitX

(1, 0, 0, 0)

public static Vector4d UnitX { get; }

Property Value

Vector4d

UnitY

(0, 1, 0, 0)

public static Vector4d UnitY { get; }

Property Value

Vector4d

UnitZ

The unit Z component vector (0, 0, 1, 0).

public static Vector4d UnitZ { get; }

Property Value

Vector4d

Zero

(0, 0, 0, 0)

public static Vector4d Zero { get; }

Property Value

Vector4d

Methods

Abs(Vector4d)

Returns a new vector containing the absolute value of each component.

public static Vector4d Abs(Vector4d value)

Parameters

value Vector4d

Returns

Vector4d

Add(Vector4d, Vector4d)

Adds two vectors component-wise.

public static Vector4d Add(Vector4d v1, Vector4d v2)

Parameters

v1 Vector4d
v2 Vector4d

Returns

Vector4d

AddInPlace(Fixed64)

Adds the specified scalar to all components in place.

public Vector4d AddInPlace(Fixed64 amount)

Parameters

amount Fixed64

Returns

Vector4d

AddInPlace(Fixed64, Fixed64, Fixed64, Fixed64)

Adds the specified component values in place.

public Vector4d AddInPlace(Fixed64 xAmount, Fixed64 yAmount, Fixed64 zAmount, Fixed64 wAmount)

Parameters

xAmount Fixed64
yAmount Fixed64
zAmount Fixed64
wAmount Fixed64

Returns

Vector4d

AddInPlace(Vector4d)

Adds another vector in place.

public Vector4d AddInPlace(Vector4d other)

Parameters

other Vector4d

Returns

Vector4d

AllComponentsGreaterThanEpsilon()

Determines whether all components are greater than Fixed64.Epsilon.

public readonly bool AllComponentsGreaterThanEpsilon()

Returns

bool

Clamp(Vector4d, Vector4d, Vector4d)

Clamps each component of the given vector within the specified min and max bounds.

public static Vector4d Clamp(Vector4d value, Vector4d min, Vector4d max)

Parameters

value Vector4d
min Vector4d
max Vector4d

Returns

Vector4d

CompareMagnitudeSquared(Vector4d, Vector4d)

Compares the exact squared magnitudes of two vectors without fixed-point saturation.

public static int CompareMagnitudeSquared(Vector4d left, Vector4d right)

Parameters

left Vector4d
right Vector4d

Returns

int

A negative value when left is shorter, zero when the magnitudes are equal, or a positive value when left is longer.

CompareTo(Vector4d)

Compares the current Vector4d instance with another Vector4d based on squared magnitude.

public readonly int CompareTo(Vector4d other)

Parameters

other Vector4d

Returns

int

Deconstruct(out Fixed64, out Fixed64, out Fixed64, out Fixed64)

Deconstructs the Vector4d into its four Fixed64 components.

public void Deconstruct(out Fixed64 x, out Fixed64 y, out Fixed64 z, out Fixed64 w)

Parameters

x Fixed64
y Fixed64
z Fixed64
w Fixed64

Deconstruct(out double, out double, out double, out double)

Deconstructs the Vector4d into its four double components.

public void Deconstruct(out double x, out double y, out double z, out double w)

Parameters

x double
y double
z double
w double

Deconstruct(out int, out int, out int, out int)

Deconstructs the Vector4d into its four int components.

public void Deconstruct(out int x, out int y, out int z, out int w)

Parameters

x int
y int
z int
w int

Deconstruct(out long, out long, out long, out long)

Deconstructs the Vector4d into its four long components.

public void Deconstruct(out long x, out long y, out long z, out long w)

Parameters

x long
y long
z long
w long

Distance(Fixed64, Fixed64, Fixed64, Fixed64)

Calculates the distance to another vector.

public readonly Fixed64 Distance(Fixed64 otherX, Fixed64 otherY, Fixed64 otherZ, Fixed64 otherW)

Parameters

otherX Fixed64
otherY Fixed64
otherZ Fixed64
otherW Fixed64

Returns

Fixed64

Distance(Vector4d)

Calculates the distance to another vector.

public readonly Fixed64 Distance(Vector4d other)

Parameters

other Vector4d

Returns

Fixed64

Distance(Vector4d, Vector4d)

Calculates the distance to another vector.

public static Fixed64 Distance(Vector4d start, Vector4d end)

Parameters

start Vector4d
end Vector4d

Returns

Fixed64

DistanceSquared(Fixed64, Fixed64, Fixed64, Fixed64)

Calculates the squared distance to another vector.

public readonly Fixed64 DistanceSquared(Fixed64 otherX, Fixed64 otherY, Fixed64 otherZ, Fixed64 otherW)

Parameters

otherX Fixed64
otherY Fixed64
otherZ Fixed64
otherW Fixed64

Returns

Fixed64

DistanceSquared(Vector4d)

Calculates the squared distance to another vector.

public readonly Fixed64 DistanceSquared(Vector4d other)

Parameters

other Vector4d

Returns

Fixed64

DistanceSquared(Vector4d, Vector4d)

Calculates the squared distance to another vector.

public static Fixed64 DistanceSquared(Vector4d start, Vector4d end)

Parameters

start Vector4d
end Vector4d

Returns

Fixed64

Divide(Vector4d, Fixed64)

Divides each vector component by the specified scalar.

public static Vector4d Divide(Vector4d value, Fixed64 divisor)

Parameters

value Vector4d
divisor Fixed64

Returns

Vector4d

Divide(Vector4d, Vector4d)

Divides each component of the first vector by the corresponding component of the second vector.

public static Vector4d Divide(Vector4d v1, Vector4d v2)

Parameters

v1 Vector4d
v2 Vector4d

Returns

Vector4d

DivideInPlace(Fixed64)

Divides all components in place.

public Vector4d DivideInPlace(Fixed64 divisor)

Parameters

divisor Fixed64

Returns

Vector4d

DivideInPlace(Fixed64, Fixed64, Fixed64, Fixed64)

Divides the vector components by the specified divisors in place.

public Vector4d DivideInPlace(Fixed64 divisorX, Fixed64 divisorY, Fixed64 divisorZ, Fixed64 divisorW)

Parameters

divisorX Fixed64
divisorY Fixed64
divisorZ Fixed64
divisorW Fixed64

Returns

Vector4d

DivideInPlace(Vector4d)

Divides all components by another vector in place.

public Vector4d DivideInPlace(Vector4d divisor)

Parameters

divisor Vector4d

Returns

Vector4d

Dot(Fixed64, Fixed64, Fixed64, Fixed64)

Calculates the dot product with another vector.

public readonly Fixed64 Dot(Fixed64 otherX, Fixed64 otherY, Fixed64 otherZ, Fixed64 otherW)

Parameters

otherX Fixed64
otherY Fixed64
otherZ Fixed64
otherW Fixed64

Returns

Fixed64

Dot(Vector4d)

Calculates the dot product with another vector.

public readonly Fixed64 Dot(Vector4d other)

Parameters

other Vector4d

Returns

Fixed64

Dot(Vector4d, Vector4d)

Calculates the dot product of two vectors.

public static Fixed64 Dot(Vector4d lhs, Vector4d rhs)

Parameters

lhs Vector4d
rhs Vector4d

Returns

Fixed64

Equals(Vector4d)

public readonly bool Equals(Vector4d other)

Parameters

other Vector4d

Returns

bool

Equals(Vector4d, Vector4d)

public readonly bool Equals(Vector4d x, Vector4d y)

Parameters

x Vector4d
y Vector4d

Returns

bool

Equals(object?)

public override readonly bool Equals(object? obj)

Parameters

obj object

Returns

bool

FromDouble(double, double, double, double)

Initializes a new Vector4d using double component values.

public static Vector4d FromDouble(double xDoub, double yDoub, double zDoub, double wDoub)

Parameters

xDoub double
yDoub double
zDoub double
wDoub double

Returns

Vector4d

Remarks

Components are converted through FromDouble(double), so non-finite values throw ArgumentOutOfRangeException and finite values outside the Q32.32 range throw OverflowException.

GetHashCode()

Returns a hash code for this vector based on its state.

public override readonly int GetHashCode()

Returns

int

GetHashCode(Vector4d)

public readonly int GetHashCode(Vector4d obj)

Parameters

obj Vector4d

Returns

int

GetMagnitude(Vector4d)

Returns the magnitude of the given vector.

public static Fixed64 GetMagnitude(Vector4d vector)

Parameters

vector Vector4d

Returns

Fixed64

GetNormalized(Vector4d)

Normalizes the given vector, returning a unit vector with the same direction.

public static Vector4d GetNormalized(Vector4d value)

Parameters

value Vector4d

Returns

Vector4d

IsNormalized()

Determines whether this vector is normalized.

public readonly bool IsNormalized()

Returns

bool

Lerp(Vector4d, Vector4d, Fixed64)

Linearly interpolates between two vectors, clamping the interpolation amount to [0, 1].

public static Vector4d Lerp(Vector4d a, Vector4d b, Fixed64 amount)

Parameters

a Vector4d
b Vector4d
amount Fixed64

Returns

Vector4d

Max(Vector4d, Vector4d)

Returns a vector whose elements are the maximum of each pair of elements.

public static Vector4d Max(Vector4d value1, Vector4d value2)

Parameters

value1 Vector4d
value2 Vector4d

Returns

Vector4d

Midpoint(Vector4d, Vector4d)

Computes the midpoint between two vectors.

public static Vector4d Midpoint(Vector4d v1, Vector4d v2)

Parameters

v1 Vector4d
v2 Vector4d

Returns

Vector4d

Min(Vector4d, Vector4d)

Returns a vector whose elements are the minimum of each pair of elements.

public static Vector4d Min(Vector4d value1, Vector4d value2)

Parameters

value1 Vector4d
value2 Vector4d

Returns

Vector4d

Multiply(Vector4d, Fixed64)

Multiplies each vector component by the specified scalar.

public static Vector4d Multiply(Vector4d value, Fixed64 factor)

Parameters

value Vector4d
factor Fixed64

Returns

Vector4d

Multiply(Vector4d, Vector4d)

Multiplies two vectors component-wise.

public static Vector4d Multiply(Vector4d a, Vector4d b)

Parameters

a Vector4d
b Vector4d

Returns

Vector4d

MultiplyInPlace(Fixed64)

Multiplies all components in place.

public Vector4d MultiplyInPlace(Fixed64 factor)

Parameters

factor Fixed64

Returns

Vector4d

MultiplyInPlace(Fixed64, Fixed64, Fixed64, Fixed64)

Multiplies the vector components by the specified factors in place.

public Vector4d MultiplyInPlace(Fixed64 factorX, Fixed64 factorY, Fixed64 factorZ, Fixed64 factorW)

Parameters

factorX Fixed64
factorY Fixed64
factorZ Fixed64
factorW Fixed64

Returns

Vector4d

MultiplyInPlace(Vector4d)

Multiplies all components by another vector in place.

public Vector4d MultiplyInPlace(Vector4d factor)

Parameters

factor Vector4d

Returns

Vector4d

NormalizeInPlace()

Normalizes this vector in place.

public Vector4d NormalizeInPlace()

Returns

Vector4d

NormalizeInPlace(out Fixed64)

Normalizes this vector in place and returns its original magnitude.

public Vector4d NormalizeInPlace(out Fixed64 mag)

Parameters

mag Fixed64

Returns

Vector4d

Set(Fixed64, Fixed64, Fixed64, Fixed64)

Sets the vector components in place and returns the modified vector.

public Vector4d Set(Fixed64 newX, Fixed64 newY, Fixed64 newZ, Fixed64 newW)

Parameters

newX Fixed64
newY Fixed64
newZ Fixed64
newW Fixed64

Returns

Vector4d

Sign(Vector4d)

Returns a new vector containing the sign of each component.

public static Vector4d Sign(Vector4d value)

Parameters

value Vector4d

Returns

Vector4d

SnapSmallComponentsToZero(Fixed64?)

Snaps components with absolute values below the threshold to zero.

public readonly Vector4d SnapSmallComponentsToZero(Fixed64? threshold = null)

Parameters

threshold Fixed64?

Returns

Vector4d

Subtract(Vector4d, Vector4d)

Subtracts two vectors component-wise.

public static Vector4d Subtract(Vector4d v1, Vector4d v2)

Parameters

v1 Vector4d
v2 Vector4d

Returns

Vector4d

SubtractInPlace(Fixed64)

Subtracts the specified scalar from all components in place.

public Vector4d SubtractInPlace(Fixed64 amount)

Parameters

amount Fixed64

Returns

Vector4d

SubtractInPlace(Fixed64, Fixed64, Fixed64, Fixed64)

Subtracts the specified component values in place.

public Vector4d SubtractInPlace(Fixed64 xAmount, Fixed64 yAmount, Fixed64 zAmount, Fixed64 wAmount)

Parameters

xAmount Fixed64
yAmount Fixed64
zAmount Fixed64
wAmount Fixed64

Returns

Vector4d

SubtractInPlace(Vector4d)

Subtracts another vector in place.

public Vector4d SubtractInPlace(Vector4d other)

Parameters

other Vector4d

Returns

Vector4d

ToString()

Returns a string representation of this vector.

public override readonly string ToString()

Returns

string

ToString(string?, IFormatProvider?)

Returns a string representation of this vector.

public readonly string ToString(string? format, IFormatProvider? formatProvider)

Parameters

format string
formatProvider IFormatProvider

Returns

string

ToVector3d()

Converts this vector to Vector3d by dropping the W component.

public readonly Vector3d ToVector3d()

Returns

Vector3d

Remarks

This is a component-preserving conversion, not a coordinate-convention conversion.

Transform(Fixed4x4, Vector4d)

Transforms a 4D vector by a 4x4 matrix.

public static Vector4d Transform(Fixed4x4 matrix, Vector4d vector)

Parameters

matrix Fixed4x4
vector Vector4d

Returns

Vector4d

Remarks

This follows the same row-vector storage convention as TransformPoint(Fixed4x4, Vector3d), preserving the computed W component instead of performing perspective division.

TryFormat(Span<char>, out int, ReadOnlySpan<char>, IFormatProvider?)

Formats this vector into the provided destination buffer.

public readonly bool TryFormat(Span<char> destination, out int charsWritten, ReadOnlySpan<char> format, IFormatProvider? provider)

Parameters

destination Span<char>
charsWritten int
format ReadOnlySpan<char>
provider IFormatProvider

Returns

bool

TryGetMagnitude(Vector4d, out Fixed64)

Attempts to return the magnitude of the given vector without saturating the result.

public static bool TryGetMagnitude(Vector4d vector, out Fixed64 magnitude)

Parameters

vector Vector4d

The vector to measure.

magnitude Fixed64

The magnitude, or MaxValue when it is not representable.

Returns

bool

true when the magnitude fits in Fixed64; otherwise, false.

UnclampedLerp(Vector4d, Vector4d, Fixed64)

Linearly interpolates between two vectors without clamping the interpolation amount.

public static Vector4d UnclampedLerp(Vector4d a, Vector4d b, Fixed64 t)

Parameters

a Vector4d
b Vector4d
t Fixed64

Returns

Vector4d

Operators

operator +(Fixed64, Vector4d)

Adds a scalar to each component.

public static Vector4d operator +(Fixed64 mag, Vector4d v1)

Parameters

mag Fixed64
v1 Vector4d

Returns

Vector4d

operator +(Vector4d, Fixed64)

Adds a scalar to each component.

public static Vector4d operator +(Vector4d v1, Fixed64 mag)

Parameters

v1 Vector4d
mag Fixed64

Returns

Vector4d

operator +(Vector4d, Vector4d)

Adds two vectors component-wise.

public static Vector4d operator +(Vector4d v1, Vector4d v2)

Parameters

v1 Vector4d
v2 Vector4d

Returns

Vector4d

operator +(Vector4d, (int x, int y, int z, int w))

Adds a tuple to each component.

public static Vector4d operator +(Vector4d v1, (int x, int y, int z, int w) v2)

Parameters

v1 Vector4d
v2 (int x, int y, int z, int w)

Returns

Vector4d

operator +((int x, int y, int z, int w), Vector4d)

Adds a tuple to each component.

public static Vector4d operator +((int x, int y, int z, int w) v2, Vector4d v1)

Parameters

v2 (int x, int y, int z, int w)
v1 Vector4d

Returns

Vector4d

operator /(Vector4d, Fixed64)

Divides each component by a scalar.

public static Vector4d operator /(Vector4d v1, Fixed64 div)

Parameters

v1 Vector4d
div Fixed64

Returns

Vector4d

operator /(Vector4d, Vector4d)

Divides each component by another vector's corresponding component.

public static Vector4d operator /(Vector4d v1, Vector4d v2)

Parameters

v1 Vector4d
v2 Vector4d

Returns

Vector4d

operator /(Vector4d, int)

Divides each component by an integer scalar.

public static Vector4d operator /(Vector4d v1, int div)

Parameters

v1 Vector4d
div int

Returns

Vector4d

operator ==(Vector4d, Vector4d)

Compares two vectors for equality.

public static bool operator ==(Vector4d left, Vector4d right)

Parameters

left Vector4d
right Vector4d

Returns

bool

operator >(Vector4d, Vector4d)

Returns true when every component in the left vector is greater than the corresponding component in the right vector.

public static bool operator >(Vector4d left, Vector4d right)

Parameters

left Vector4d
right Vector4d

Returns

bool

operator >=(Vector4d, Vector4d)

Returns true when every component in the left vector is greater than or equal to the corresponding component in the right vector.

public static bool operator >=(Vector4d left, Vector4d right)

Parameters

left Vector4d
right Vector4d

Returns

bool

operator !=(Vector4d, Vector4d)

Compares two vectors for inequality.

public static bool operator !=(Vector4d left, Vector4d right)

Parameters

left Vector4d
right Vector4d

Returns

bool

operator <(Vector4d, Vector4d)

Returns true when every component in the left vector is less than the corresponding component in the right vector.

public static bool operator <(Vector4d left, Vector4d right)

Parameters

left Vector4d
right Vector4d

Returns

bool

operator <=(Vector4d, Vector4d)

Returns true when every component in the left vector is less than or equal to the corresponding component in the right vector.

public static bool operator <=(Vector4d left, Vector4d right)

Parameters

left Vector4d
right Vector4d

Returns

bool

operator *(Fixed4x4, Vector4d)

Transforms a vector by a 4x4 matrix.

public static Vector4d operator *(Fixed4x4 matrix, Vector4d vector)

Parameters

matrix Fixed4x4
vector Vector4d

Returns

Vector4d

operator *(Fixed64, Vector4d)

Multiplies each component by a scalar.

public static Vector4d operator *(Fixed64 mag, Vector4d v1)

Parameters

mag Fixed64
v1 Vector4d

Returns

Vector4d

operator *(Vector4d, Fixed4x4)

Transforms a vector by a 4x4 matrix.

public static Vector4d operator *(Vector4d vector, Fixed4x4 matrix)

Parameters

vector Vector4d
matrix Fixed4x4

Returns

Vector4d

operator *(Vector4d, Fixed64)

Multiplies each component by a scalar.

public static Vector4d operator *(Vector4d v1, Fixed64 mag)

Parameters

v1 Vector4d
mag Fixed64

Returns

Vector4d

operator *(Vector4d, Vector4d)

Multiplies two vectors component-wise.

public static Vector4d operator *(Vector4d v1, Vector4d v2)

Parameters

v1 Vector4d
v2 Vector4d

Returns

Vector4d

operator *(Vector4d, int)

Multiplies each component by an integer scalar.

public static Vector4d operator *(Vector4d v1, int mag)

Parameters

v1 Vector4d
mag int

Returns

Vector4d

operator *(int, Vector4d)

Multiplies each component by an integer scalar.

public static Vector4d operator *(int mag, Vector4d v1)

Parameters

mag int
v1 Vector4d

Returns

Vector4d

operator -(Fixed64, Vector4d)

Subtracts a scalar from each component.

public static Vector4d operator -(Fixed64 mag, Vector4d v1)

Parameters

mag Fixed64
v1 Vector4d

Returns

Vector4d

operator -(Vector4d, Fixed64)

Subtracts a scalar from each component.

public static Vector4d operator -(Vector4d v1, Fixed64 mag)

Parameters

v1 Vector4d
mag Fixed64

Returns

Vector4d

operator -(Vector4d, Vector4d)

Subtracts two vectors component-wise.

public static Vector4d operator -(Vector4d v1, Vector4d v2)

Parameters

v1 Vector4d
v2 Vector4d

Returns

Vector4d

operator -(Vector4d, (int x, int y, int z, int w))

Subtracts a tuple from each component.

public static Vector4d operator -(Vector4d v1, (int x, int y, int z, int w) v2)

Parameters

v1 Vector4d
v2 (int x, int y, int z, int w)

Returns

Vector4d

operator -((int x, int y, int z, int w), Vector4d)

Subtracts each vector component from a tuple component.

public static Vector4d operator -((int x, int y, int z, int w) v1, Vector4d v2)

Parameters

v1 (int x, int y, int z, int w)
v2 Vector4d

Returns

Vector4d

operator -(Vector4d)

Negates the vector.

public static Vector4d operator -(Vector4d v1)

Parameters

v1 Vector4d

Returns

Vector4d