Table of Contents

Struct TorqueVector3

Namespace
Thunder.UnitsNET.Vectors
Assembly
Thunder.UnitsNET.Vectors.dll

A 3D vector whose components represent torque, each expressed as a UnitsNet.Torque.

In 3D rigid-body physics, torque is a vector: its direction is the rotation axis (by the right-hand rule) and its magnitude is the rotational force. Use this type when applying angular forces in 3D simulation — dividing by a UnitsNet.MassMomentOfInertia yields a RotationalAccelerationVector3.

public readonly record struct TorqueVector3 : IEquatable<TorqueVector3>
Implements
Inherited Members

Constructors

TorqueVector3(Torque, Torque, Torque)

Constructs a TorqueVector3 from three UnitsNet.Torque components.

public TorqueVector3(Torque x, Torque y, Torque z)

Parameters

x Torque

The X component.

y Torque

The Y component.

z Torque

The Z component.

Properties

Magnitude

Returns the Euclidean magnitude of this vector as a UnitsNet.Torque. The result is expressed in the same unit as the X component.

public Torque Magnitude { get; }

Property Value

Torque

X

The X component.

public Torque X { get; }

Property Value

Torque

Y

The Y component.

public Torque Y { get; }

Property Value

Torque

Z

The Z component.

public Torque Z { get; }

Property Value

Torque

Zero

A TorqueVector3 with all components set to zero.

public static TorqueVector3 Zero { get; }

Property Value

TorqueVector3

Methods

Abs()

Returns a vector with each component replaced by its absolute value.

public TorqueVector3 Abs()

Returns

TorqueVector3

A TorqueVector3 with non-negative components.

Add(TorqueVector3)

Adds two vectors component-wise.

public TorqueVector3 Add(TorqueVector3 other)

Parameters

other TorqueVector3

The vector to add.

Returns

TorqueVector3

The component-wise sum.

ApproximatelyEquals(TorqueVector3, Torque)

Returns true if each component of this vector is within tolerance of the corresponding component of other.

public bool ApproximatelyEquals(TorqueVector3 other, Torque tolerance)

Parameters

other TorqueVector3

The vector to compare against.

tolerance Torque

The maximum allowed difference per component (inclusive).

Returns

bool

true when |X - other.X| <= tolerance, |Y - other.Y| <= tolerance, and |Z - other.Z| <= tolerance.

As(TorqueUnit)

Projects all three components into the requested unit, returning a unit-less DoubleVector3.

public DoubleVector3 As(TorqueUnit unit)

Parameters

unit TorqueUnit

The target unit for each component.

Returns

DoubleVector3

A DoubleVector3 with components expressed in unit.

AsDefault()

Returns all three components expressed in the SI base unit as a DoubleVector3.

public DoubleVector3 AsDefault()

Returns

DoubleVector3

A DoubleVector3 with components in the default SI unit.

Clamp(TorqueVector3, TorqueVector3)

Returns a vector with each component clamped to the range [min, max].

public TorqueVector3 Clamp(TorqueVector3 min, TorqueVector3 max)

Parameters

min TorqueVector3

The lower bound vector (inclusive, per component).

max TorqueVector3

The upper bound vector (inclusive, per component).

Returns

TorqueVector3

A TorqueVector3 with each component in [min, max].

Divide(double)

Divides the vector by a scalar divisor.

public TorqueVector3 Divide(double scalar)

Parameters

scalar double

The scalar divisor.

Returns

TorqueVector3

The divided vector.

Equals(TorqueVector3)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(TorqueVector3 other)

Parameters

other TorqueVector3

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

FromGramForceCentimeters(double, double, double)

Creates a TorqueVector3 with all components created via UnitsNet.Torque.FromGramForceCentimeters(UnitsNet.QuantityValue).

public static TorqueVector3 FromGramForceCentimeters(double x, double y, double z)

Parameters

x double

The X component value.

y double

The Y component value.

z double

The Z component value.

Returns

TorqueVector3

A TorqueVector3 with all components in the corresponding unit.

FromGramForceMeters(double, double, double)

Creates a TorqueVector3 with all components created via UnitsNet.Torque.FromGramForceMeters(UnitsNet.QuantityValue).

public static TorqueVector3 FromGramForceMeters(double x, double y, double z)

Parameters

x double

The X component value.

y double

The Y component value.

z double

The Z component value.

Returns

TorqueVector3

A TorqueVector3 with all components in the corresponding unit.

FromGramForceMillimeters(double, double, double)

Creates a TorqueVector3 with all components created via UnitsNet.Torque.FromGramForceMillimeters(UnitsNet.QuantityValue).

public static TorqueVector3 FromGramForceMillimeters(double x, double y, double z)

Parameters

x double

The X component value.

y double

The Y component value.

z double

The Z component value.

Returns

TorqueVector3

A TorqueVector3 with all components in the corresponding unit.

FromKilogramForceCentimeters(double, double, double)

Creates a TorqueVector3 with all components created via UnitsNet.Torque.FromKilogramForceCentimeters(UnitsNet.QuantityValue).

public static TorqueVector3 FromKilogramForceCentimeters(double x, double y, double z)

Parameters

x double

The X component value.

y double

The Y component value.

z double

The Z component value.

Returns

TorqueVector3

A TorqueVector3 with all components in the corresponding unit.

FromKilogramForceMeters(double, double, double)

Creates a TorqueVector3 with all components created via UnitsNet.Torque.FromKilogramForceMeters(UnitsNet.QuantityValue).

public static TorqueVector3 FromKilogramForceMeters(double x, double y, double z)

Parameters

x double

The X component value.

y double

The Y component value.

z double

The Z component value.

Returns

TorqueVector3

A TorqueVector3 with all components in the corresponding unit.

FromKilogramForceMillimeters(double, double, double)

Creates a TorqueVector3 with all components created via UnitsNet.Torque.FromKilogramForceMillimeters(UnitsNet.QuantityValue).

public static TorqueVector3 FromKilogramForceMillimeters(double x, double y, double z)

Parameters

x double

The X component value.

y double

The Y component value.

z double

The Z component value.

Returns

TorqueVector3

A TorqueVector3 with all components in the corresponding unit.

FromKilonewtonCentimeters(double, double, double)

Creates a TorqueVector3 with all components created via UnitsNet.Torque.FromKilonewtonCentimeters(UnitsNet.QuantityValue).

public static TorqueVector3 FromKilonewtonCentimeters(double x, double y, double z)

Parameters

x double

The X component value.

y double

The Y component value.

z double

The Z component value.

Returns

TorqueVector3

A TorqueVector3 with all components in the corresponding unit.

FromKilonewtonMeters(double, double, double)

Creates a TorqueVector3 with all components created via UnitsNet.Torque.FromKilonewtonMeters(UnitsNet.QuantityValue).

public static TorqueVector3 FromKilonewtonMeters(double x, double y, double z)

Parameters

x double

The X component value.

y double

The Y component value.

z double

The Z component value.

Returns

TorqueVector3

A TorqueVector3 with all components in the corresponding unit.

FromKilonewtonMillimeters(double, double, double)

Creates a TorqueVector3 with all components created via UnitsNet.Torque.FromKilonewtonMillimeters(UnitsNet.QuantityValue).

public static TorqueVector3 FromKilonewtonMillimeters(double x, double y, double z)

Parameters

x double

The X component value.

y double

The Y component value.

z double

The Z component value.

Returns

TorqueVector3

A TorqueVector3 with all components in the corresponding unit.

FromKilopoundForceFeet(double, double, double)

Creates a TorqueVector3 with all components created via UnitsNet.Torque.FromKilopoundForceFeet(UnitsNet.QuantityValue).

public static TorqueVector3 FromKilopoundForceFeet(double x, double y, double z)

Parameters

x double

The X component value.

y double

The Y component value.

z double

The Z component value.

Returns

TorqueVector3

A TorqueVector3 with all components in the corresponding unit.

FromKilopoundForceInches(double, double, double)

Creates a TorqueVector3 with all components created via UnitsNet.Torque.FromKilopoundForceInches(UnitsNet.QuantityValue).

public static TorqueVector3 FromKilopoundForceInches(double x, double y, double z)

Parameters

x double

The X component value.

y double

The Y component value.

z double

The Z component value.

Returns

TorqueVector3

A TorqueVector3 with all components in the corresponding unit.

FromMeganewtonCentimeters(double, double, double)

Creates a TorqueVector3 with all components created via UnitsNet.Torque.FromMeganewtonCentimeters(UnitsNet.QuantityValue).

public static TorqueVector3 FromMeganewtonCentimeters(double x, double y, double z)

Parameters

x double

The X component value.

y double

The Y component value.

z double

The Z component value.

Returns

TorqueVector3

A TorqueVector3 with all components in the corresponding unit.

FromMeganewtonMeters(double, double, double)

Creates a TorqueVector3 with all components created via UnitsNet.Torque.FromMeganewtonMeters(UnitsNet.QuantityValue).

public static TorqueVector3 FromMeganewtonMeters(double x, double y, double z)

Parameters

x double

The X component value.

y double

The Y component value.

z double

The Z component value.

Returns

TorqueVector3

A TorqueVector3 with all components in the corresponding unit.

FromMeganewtonMillimeters(double, double, double)

Creates a TorqueVector3 with all components created via UnitsNet.Torque.FromMeganewtonMillimeters(UnitsNet.QuantityValue).

public static TorqueVector3 FromMeganewtonMillimeters(double x, double y, double z)

Parameters

x double

The X component value.

y double

The Y component value.

z double

The Z component value.

Returns

TorqueVector3

A TorqueVector3 with all components in the corresponding unit.

FromMegapoundForceFeet(double, double, double)

Creates a TorqueVector3 with all components created via UnitsNet.Torque.FromMegapoundForceFeet(UnitsNet.QuantityValue).

public static TorqueVector3 FromMegapoundForceFeet(double x, double y, double z)

Parameters

x double

The X component value.

y double

The Y component value.

z double

The Z component value.

Returns

TorqueVector3

A TorqueVector3 with all components in the corresponding unit.

FromMegapoundForceInches(double, double, double)

Creates a TorqueVector3 with all components created via UnitsNet.Torque.FromMegapoundForceInches(UnitsNet.QuantityValue).

public static TorqueVector3 FromMegapoundForceInches(double x, double y, double z)

Parameters

x double

The X component value.

y double

The Y component value.

z double

The Z component value.

Returns

TorqueVector3

A TorqueVector3 with all components in the corresponding unit.

FromNewtonCentimeters(double, double, double)

Creates a TorqueVector3 with all components created via UnitsNet.Torque.FromNewtonCentimeters(UnitsNet.QuantityValue).

public static TorqueVector3 FromNewtonCentimeters(double x, double y, double z)

Parameters

x double

The X component value.

y double

The Y component value.

z double

The Z component value.

Returns

TorqueVector3

A TorqueVector3 with all components in the corresponding unit.

FromNewtonMeters(double, double, double)

Creates a TorqueVector3 with all components created via UnitsNet.Torque.FromNewtonMeters(UnitsNet.QuantityValue).

public static TorqueVector3 FromNewtonMeters(double x, double y, double z)

Parameters

x double

The X component value.

y double

The Y component value.

z double

The Z component value.

Returns

TorqueVector3

A TorqueVector3 with all components in the corresponding unit.

FromNewtonMillimeters(double, double, double)

Creates a TorqueVector3 with all components created via UnitsNet.Torque.FromNewtonMillimeters(UnitsNet.QuantityValue).

public static TorqueVector3 FromNewtonMillimeters(double x, double y, double z)

Parameters

x double

The X component value.

y double

The Y component value.

z double

The Z component value.

Returns

TorqueVector3

A TorqueVector3 with all components in the corresponding unit.

FromPoundForceFeet(double, double, double)

Creates a TorqueVector3 with all components created via UnitsNet.Torque.FromPoundForceFeet(UnitsNet.QuantityValue).

public static TorqueVector3 FromPoundForceFeet(double x, double y, double z)

Parameters

x double

The X component value.

y double

The Y component value.

z double

The Z component value.

Returns

TorqueVector3

A TorqueVector3 with all components in the corresponding unit.

FromPoundForceInches(double, double, double)

Creates a TorqueVector3 with all components created via UnitsNet.Torque.FromPoundForceInches(UnitsNet.QuantityValue).

public static TorqueVector3 FromPoundForceInches(double x, double y, double z)

Parameters

x double

The X component value.

y double

The Y component value.

z double

The Z component value.

Returns

TorqueVector3

A TorqueVector3 with all components in the corresponding unit.

FromPoundalFeet(double, double, double)

Creates a TorqueVector3 with all components created via UnitsNet.Torque.FromPoundalFeet(UnitsNet.QuantityValue).

public static TorqueVector3 FromPoundalFeet(double x, double y, double z)

Parameters

x double

The X component value.

y double

The Y component value.

z double

The Z component value.

Returns

TorqueVector3

A TorqueVector3 with all components in the corresponding unit.

FromTonneForceCentimeters(double, double, double)

Creates a TorqueVector3 with all components created via UnitsNet.Torque.FromTonneForceCentimeters(UnitsNet.QuantityValue).

public static TorqueVector3 FromTonneForceCentimeters(double x, double y, double z)

Parameters

x double

The X component value.

y double

The Y component value.

z double

The Z component value.

Returns

TorqueVector3

A TorqueVector3 with all components in the corresponding unit.

FromTonneForceMeters(double, double, double)

Creates a TorqueVector3 with all components created via UnitsNet.Torque.FromTonneForceMeters(UnitsNet.QuantityValue).

public static TorqueVector3 FromTonneForceMeters(double x, double y, double z)

Parameters

x double

The X component value.

y double

The Y component value.

z double

The Z component value.

Returns

TorqueVector3

A TorqueVector3 with all components in the corresponding unit.

FromTonneForceMillimeters(double, double, double)

Creates a TorqueVector3 with all components created via UnitsNet.Torque.FromTonneForceMillimeters(UnitsNet.QuantityValue).

public static TorqueVector3 FromTonneForceMillimeters(double x, double y, double z)

Parameters

x double

The X component value.

y double

The Y component value.

z double

The Z component value.

Returns

TorqueVector3

A TorqueVector3 with all components in the corresponding unit.

GetHashCode()

Returns the hash code for this instance.

public override int GetHashCode()

Returns

int

A 32-bit signed integer that is the hash code for this instance.

Lerp(TorqueVector3, TorqueVector3, double)

Linearly interpolates between two vectors.

The result at t = 0 is a; at t = 1 it is b. Values of t outside [0, 1] extrapolate beyond the endpoints — use LerpClamped(TorqueVector3, TorqueVector3, double) if you need the result bounded to the segment between a and b.

public static TorqueVector3 Lerp(TorqueVector3 a, TorqueVector3 b, double t)

Parameters

a TorqueVector3

The start vector (t = 0).

b TorqueVector3

The end vector (t = 1).

t double

The interpolation parameter. Values outside [0, 1] extrapolate.

Returns

TorqueVector3

The interpolated TorqueVector3.

LerpClamped(TorqueVector3, TorqueVector3, double)

Linearly interpolates between two vectors, with t clamped to [0, 1].

public static TorqueVector3 LerpClamped(TorqueVector3 a, TorqueVector3 b, double t)

Parameters

a TorqueVector3

The start vector (t = 0).

b TorqueVector3

The end vector (t = 1).

t double

The interpolation parameter, clamped to [0, 1].

Returns

TorqueVector3

The interpolated TorqueVector3, always between a and b.

Multiply(double)

Scales the vector by a scalar factor.

public TorqueVector3 Multiply(double scalar)

Parameters

scalar double

The scalar factor.

Returns

TorqueVector3

The scaled vector.

Negate()

Negates all components.

public TorqueVector3 Negate()

Returns

TorqueVector3

A vector with all components negated.

Normalize()

Returns a dimensionless unit vector pointing in the same direction. For a zero vector, Zero is returned.

public DoubleVector3 Normalize()

Returns

DoubleVector3

A unit-length DoubleVector3 in the same direction.

Subtract(TorqueVector3)

Subtracts two vectors component-wise.

public TorqueVector3 Subtract(TorqueVector3 other)

Parameters

other TorqueVector3

The vector to subtract.

Returns

TorqueVector3

The component-wise difference.

Operators

operator +(TorqueVector3, TorqueVector3)

Adds two vectors component-wise.

public static TorqueVector3 operator +(TorqueVector3 left, TorqueVector3 right)

Parameters

left TorqueVector3

The left operand.

right TorqueVector3

The right operand.

Returns

TorqueVector3

The component-wise sum.

operator /(TorqueVector3, double)

Divides the vector by a scalar divisor.

public static TorqueVector3 operator /(TorqueVector3 left, double scalar)

Parameters

left TorqueVector3

The vector to divide.

scalar double

The scalar divisor.

Returns

TorqueVector3

The divided vector.

operator /(TorqueVector3, MassMomentOfInertia)

Divides each component of the torque vector by right to produce a RotationalAccelerationVector3. Implements Newton's second law for rotation: α_vec = τ_vec / I.

public static RotationalAccelerationVector3 operator /(TorqueVector3 left, MassMomentOfInertia right)

Parameters

left TorqueVector3
right MassMomentOfInertia

Returns

RotationalAccelerationVector3

Remarks

The result is always in rad/s² regardless of the input units. UnitsNet treats radians as dimensionless, so no angular unit can be tracked across multiplication — the SI radian representation is the only stable common denominator. If you need the result in other units, convert after the fact:

var torque = new TorqueVector3(Torque.FromNewtonMeters(10), Torque.FromNewtonMeters(0), Torque.FromNewtonMeters(0));
var inertia = MassMomentOfInertia.FromKilogramSquareMeters(2);
var alpha = torque / inertia;
var xDegPerSecSq = alpha.X.As(RotationalAccelerationUnit.DegreePerSecondSquared);

operator *(double, TorqueVector3)

Scales the vector by a scalar factor. Operands may be supplied in either order.

public static TorqueVector3 operator *(double scalar, TorqueVector3 right)

Parameters

scalar double

The scalar factor.

right TorqueVector3

The vector to scale.

Returns

TorqueVector3

The scaled vector.

operator *(TorqueVector3, double)

Scales the vector by a scalar factor.

public static TorqueVector3 operator *(TorqueVector3 left, double scalar)

Parameters

left TorqueVector3

The vector to scale.

scalar double

The scalar factor.

Returns

TorqueVector3

The scaled vector.

operator -(TorqueVector3, TorqueVector3)

Subtracts two vectors component-wise.

public static TorqueVector3 operator -(TorqueVector3 left, TorqueVector3 right)

Parameters

left TorqueVector3

The left operand.

right TorqueVector3

The right operand.

Returns

TorqueVector3

The component-wise difference.

operator -(TorqueVector3)

Negates all components.

public static TorqueVector3 operator -(TorqueVector3 value)

Parameters

value TorqueVector3

The vector to negate.

Returns

TorqueVector3

A vector with all components negated.

latest ▼