Table of Contents

Struct ImpulseVector3

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

A 3D vector whose components represent impulse, each expressed as a UnitsNet.Impulse.

public readonly record struct ImpulseVector3 : IEquatable<ImpulseVector3>
Implements
Inherited Members
Extension Methods

Constructors

ImpulseVector3(Impulse, Impulse, Impulse)

Constructs a ImpulseVector3 from three UnitsNet.Impulse components.

public ImpulseVector3(Impulse x, Impulse y, Impulse z)

Parameters

x Impulse

The X component.

y Impulse

The Y component.

z Impulse

The Z component.

Properties

Magnitude

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

public Impulse Magnitude { get; }

Property Value

Impulse

X

The X component.

public Impulse X { get; }

Property Value

Impulse

Y

The Y component.

public Impulse Y { get; }

Property Value

Impulse

Z

The Z component.

public Impulse Z { get; }

Property Value

Impulse

Zero

A ImpulseVector3 with all components set to zero.

public static ImpulseVector3 Zero { get; }

Property Value

ImpulseVector3

Methods

Abs()

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

public ImpulseVector3 Abs()

Returns

ImpulseVector3

A ImpulseVector3 with non-negative components.

Add(ImpulseVector3)

Adds two vectors component-wise.

public ImpulseVector3 Add(ImpulseVector3 other)

Parameters

other ImpulseVector3

The vector to add.

Returns

ImpulseVector3

The component-wise sum.

ApproximatelyEquals(ImpulseVector3, Impulse)

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

public bool ApproximatelyEquals(ImpulseVector3 other, Impulse tolerance)

Parameters

other ImpulseVector3

The vector to compare against.

tolerance Impulse

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(ImpulseUnit)

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

public DoubleVector3 As(ImpulseUnit unit)

Parameters

unit ImpulseUnit

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(ImpulseVector3, ImpulseVector3)

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

public ImpulseVector3 Clamp(ImpulseVector3 min, ImpulseVector3 max)

Parameters

min ImpulseVector3

The lower bound vector (inclusive, per component).

max ImpulseVector3

The upper bound vector (inclusive, per component).

Returns

ImpulseVector3

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

Divide(double)

Divides the vector by a scalar divisor.

public ImpulseVector3 Divide(double scalar)

Parameters

scalar double

The scalar divisor.

Returns

ImpulseVector3

The divided vector.

Equals(ImpulseVector3)

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

public bool Equals(ImpulseVector3 other)

Parameters

other ImpulseVector3

An object to compare with this object.

Returns

bool

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

FromCentinewtonSeconds(double, double, double)

Creates a ImpulseVector3 with all components created via UnitsNet.Impulse.FromCentinewtonSeconds(UnitsNet.QuantityValue).

public static ImpulseVector3 FromCentinewtonSeconds(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

ImpulseVector3

A ImpulseVector3 with all components in the corresponding unit.

FromDecanewtonSeconds(double, double, double)

Creates a ImpulseVector3 with all components created via UnitsNet.Impulse.FromDecanewtonSeconds(UnitsNet.QuantityValue).

public static ImpulseVector3 FromDecanewtonSeconds(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

ImpulseVector3

A ImpulseVector3 with all components in the corresponding unit.

FromDecinewtonSeconds(double, double, double)

Creates a ImpulseVector3 with all components created via UnitsNet.Impulse.FromDecinewtonSeconds(UnitsNet.QuantityValue).

public static ImpulseVector3 FromDecinewtonSeconds(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

ImpulseVector3

A ImpulseVector3 with all components in the corresponding unit.

FromKilogramMetersPerSecond(double, double, double)

Creates a ImpulseVector3 with all components created via UnitsNet.Impulse.FromKilogramMetersPerSecond(UnitsNet.QuantityValue).

public static ImpulseVector3 FromKilogramMetersPerSecond(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

ImpulseVector3

A ImpulseVector3 with all components in the corresponding unit.

FromKilonewtonSeconds(double, double, double)

Creates a ImpulseVector3 with all components created via UnitsNet.Impulse.FromKilonewtonSeconds(UnitsNet.QuantityValue).

public static ImpulseVector3 FromKilonewtonSeconds(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

ImpulseVector3

A ImpulseVector3 with all components in the corresponding unit.

FromMeganewtonSeconds(double, double, double)

Creates a ImpulseVector3 with all components created via UnitsNet.Impulse.FromMeganewtonSeconds(UnitsNet.QuantityValue).

public static ImpulseVector3 FromMeganewtonSeconds(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

ImpulseVector3

A ImpulseVector3 with all components in the corresponding unit.

FromMicronewtonSeconds(double, double, double)

Creates a ImpulseVector3 with all components created via UnitsNet.Impulse.FromMicronewtonSeconds(UnitsNet.QuantityValue).

public static ImpulseVector3 FromMicronewtonSeconds(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

ImpulseVector3

A ImpulseVector3 with all components in the corresponding unit.

FromMillinewtonSeconds(double, double, double)

Creates a ImpulseVector3 with all components created via UnitsNet.Impulse.FromMillinewtonSeconds(UnitsNet.QuantityValue).

public static ImpulseVector3 FromMillinewtonSeconds(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

ImpulseVector3

A ImpulseVector3 with all components in the corresponding unit.

FromNanonewtonSeconds(double, double, double)

Creates a ImpulseVector3 with all components created via UnitsNet.Impulse.FromNanonewtonSeconds(UnitsNet.QuantityValue).

public static ImpulseVector3 FromNanonewtonSeconds(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

ImpulseVector3

A ImpulseVector3 with all components in the corresponding unit.

FromNewtonSeconds(double, double, double)

Creates a ImpulseVector3 with all components created via UnitsNet.Impulse.FromNewtonSeconds(UnitsNet.QuantityValue).

public static ImpulseVector3 FromNewtonSeconds(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

ImpulseVector3

A ImpulseVector3 with all components in the corresponding unit.

FromPoundFeetPerSecond(double, double, double)

Creates a ImpulseVector3 with all components created via UnitsNet.Impulse.FromPoundFeetPerSecond(UnitsNet.QuantityValue).

public static ImpulseVector3 FromPoundFeetPerSecond(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

ImpulseVector3

A ImpulseVector3 with all components in the corresponding unit.

FromPoundForceSeconds(double, double, double)

Creates a ImpulseVector3 with all components created via UnitsNet.Impulse.FromPoundForceSeconds(UnitsNet.QuantityValue).

public static ImpulseVector3 FromPoundForceSeconds(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

ImpulseVector3

A ImpulseVector3 with all components in the corresponding unit.

FromSlugFeetPerSecond(double, double, double)

Creates a ImpulseVector3 with all components created via UnitsNet.Impulse.FromSlugFeetPerSecond(UnitsNet.QuantityValue).

public static ImpulseVector3 FromSlugFeetPerSecond(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

ImpulseVector3

A ImpulseVector3 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(ImpulseVector3, ImpulseVector3, 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(ImpulseVector3, ImpulseVector3, double) if you need the result bounded to the segment between a and b.

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

Parameters

a ImpulseVector3

The start vector (t = 0).

b ImpulseVector3

The end vector (t = 1).

t double

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

Returns

ImpulseVector3

The interpolated ImpulseVector3.

LerpClamped(ImpulseVector3, ImpulseVector3, double)

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

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

Parameters

a ImpulseVector3

The start vector (t = 0).

b ImpulseVector3

The end vector (t = 1).

t double

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

Returns

ImpulseVector3

The interpolated ImpulseVector3, always between a and b.

Multiply(double)

Scales the vector by a scalar factor.

public ImpulseVector3 Multiply(double scalar)

Parameters

scalar double

The scalar factor.

Returns

ImpulseVector3

The scaled vector.

Negate()

Negates all components.

public ImpulseVector3 Negate()

Returns

ImpulseVector3

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(ImpulseVector3)

Subtracts two vectors component-wise.

public ImpulseVector3 Subtract(ImpulseVector3 other)

Parameters

other ImpulseVector3

The vector to subtract.

Returns

ImpulseVector3

The component-wise difference.

Operators

operator +(ImpulseVector3, ImpulseVector3)

Adds two vectors component-wise.

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

Parameters

left ImpulseVector3

The left operand.

right ImpulseVector3

The right operand.

Returns

ImpulseVector3

The component-wise sum.

operator /(ImpulseVector3, double)

Divides the vector by a scalar divisor.

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

Parameters

left ImpulseVector3

The vector to divide.

scalar double

The scalar divisor.

Returns

ImpulseVector3

The divided vector.

operator *(double, ImpulseVector3)

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

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

Parameters

scalar double

The scalar factor.

right ImpulseVector3

The vector to scale.

Returns

ImpulseVector3

The scaled vector.

operator *(ImpulseVector3, double)

Scales the vector by a scalar factor.

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

Parameters

left ImpulseVector3

The vector to scale.

scalar double

The scalar factor.

Returns

ImpulseVector3

The scaled vector.

operator -(ImpulseVector3, ImpulseVector3)

Subtracts two vectors component-wise.

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

Parameters

left ImpulseVector3

The left operand.

right ImpulseVector3

The right operand.

Returns

ImpulseVector3

The component-wise difference.

operator -(ImpulseVector3)

Negates all components.

public static ImpulseVector3 operator -(ImpulseVector3 value)

Parameters

value ImpulseVector3

The vector to negate.

Returns

ImpulseVector3

A vector with all components negated.

v0.7.0 ▼