Struct ElectricCurrentDensityVector3
A 3D vector whose components represent electriccurrentdensity, each expressed as a UnitsNet.ElectricCurrentDensity.
public readonly record struct ElectricCurrentDensityVector3 : IEquatable<ElectricCurrentDensityVector3>
- Implements
- Inherited Members
- Extension Methods
Constructors
ElectricCurrentDensityVector3(ElectricCurrentDensity, ElectricCurrentDensity, ElectricCurrentDensity)
Constructs a ElectricCurrentDensityVector3 from three UnitsNet.ElectricCurrentDensity components.
public ElectricCurrentDensityVector3(ElectricCurrentDensity x, ElectricCurrentDensity y, ElectricCurrentDensity z)
Parameters
xElectricCurrentDensityThe X component.
yElectricCurrentDensityThe Y component.
zElectricCurrentDensityThe Z component.
Properties
Magnitude
Returns the Euclidean magnitude of this vector as a UnitsNet.ElectricCurrentDensity. The result is expressed in the same unit as the X component.
public ElectricCurrentDensity Magnitude { get; }
Property Value
- ElectricCurrentDensity
X
The X component.
public ElectricCurrentDensity X { get; }
Property Value
- ElectricCurrentDensity
Y
The Y component.
public ElectricCurrentDensity Y { get; }
Property Value
- ElectricCurrentDensity
Z
The Z component.
public ElectricCurrentDensity Z { get; }
Property Value
- ElectricCurrentDensity
Zero
A ElectricCurrentDensityVector3 with all components set to zero.
public static ElectricCurrentDensityVector3 Zero { get; }
Property Value
Methods
Abs()
Returns a vector with each component replaced by its absolute value.
public ElectricCurrentDensityVector3 Abs()
Returns
- ElectricCurrentDensityVector3
A ElectricCurrentDensityVector3 with non-negative components.
Add(ElectricCurrentDensityVector3)
Adds two vectors component-wise.
public ElectricCurrentDensityVector3 Add(ElectricCurrentDensityVector3 other)
Parameters
otherElectricCurrentDensityVector3The vector to add.
Returns
- ElectricCurrentDensityVector3
The component-wise sum.
ApproximatelyEquals(ElectricCurrentDensityVector3, ElectricCurrentDensity)
Returns true if each component of this vector is within
tolerance of the corresponding component of other.
public bool ApproximatelyEquals(ElectricCurrentDensityVector3 other, ElectricCurrentDensity tolerance)
Parameters
otherElectricCurrentDensityVector3The vector to compare against.
toleranceElectricCurrentDensityThe maximum allowed difference per component (inclusive).
Returns
- bool
true when |X - other.X| <= tolerance, |Y - other.Y| <= tolerance, and |Z - other.Z| <= tolerance.
As(ElectricCurrentDensityUnit)
Projects all three components into the requested unit, returning a unit-less DoubleVector3.
public DoubleVector3 As(ElectricCurrentDensityUnit unit)
Parameters
unitElectricCurrentDensityUnitThe 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(ElectricCurrentDensityVector3, ElectricCurrentDensityVector3)
Returns a vector with each component clamped to the range [min, max].
public ElectricCurrentDensityVector3 Clamp(ElectricCurrentDensityVector3 min, ElectricCurrentDensityVector3 max)
Parameters
minElectricCurrentDensityVector3The lower bound vector (inclusive, per component).
maxElectricCurrentDensityVector3The upper bound vector (inclusive, per component).
Returns
- ElectricCurrentDensityVector3
A ElectricCurrentDensityVector3 with each component in [min, max].
Divide(double)
Divides the vector by a scalar divisor.
public ElectricCurrentDensityVector3 Divide(double scalar)
Parameters
scalardoubleThe scalar divisor.
Returns
- ElectricCurrentDensityVector3
The divided vector.
Equals(ElectricCurrentDensityVector3)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(ElectricCurrentDensityVector3 other)
Parameters
otherElectricCurrentDensityVector3An object to compare with this object.
Returns
FromAmperesPerSquareFoot(double, double, double)
Creates a ElectricCurrentDensityVector3 with all components created via UnitsNet.ElectricCurrentDensity.FromAmperesPerSquareFoot(UnitsNet.QuantityValue).
public static ElectricCurrentDensityVector3 FromAmperesPerSquareFoot(double x, double y, double z)
Parameters
Returns
- ElectricCurrentDensityVector3
A ElectricCurrentDensityVector3 with all components in the corresponding unit.
FromAmperesPerSquareInch(double, double, double)
Creates a ElectricCurrentDensityVector3 with all components created via UnitsNet.ElectricCurrentDensity.FromAmperesPerSquareInch(UnitsNet.QuantityValue).
public static ElectricCurrentDensityVector3 FromAmperesPerSquareInch(double x, double y, double z)
Parameters
Returns
- ElectricCurrentDensityVector3
A ElectricCurrentDensityVector3 with all components in the corresponding unit.
FromAmperesPerSquareMeter(double, double, double)
Creates a ElectricCurrentDensityVector3 with all components created via UnitsNet.ElectricCurrentDensity.FromAmperesPerSquareMeter(UnitsNet.QuantityValue).
public static ElectricCurrentDensityVector3 FromAmperesPerSquareMeter(double x, double y, double z)
Parameters
Returns
- ElectricCurrentDensityVector3
A ElectricCurrentDensityVector3 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(ElectricCurrentDensityVector3, ElectricCurrentDensityVector3, 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(ElectricCurrentDensityVector3, ElectricCurrentDensityVector3, double) if you need the result bounded to the segment
between a and b.
public static ElectricCurrentDensityVector3 Lerp(ElectricCurrentDensityVector3 a, ElectricCurrentDensityVector3 b, double t)
Parameters
aElectricCurrentDensityVector3The start vector (
t= 0).bElectricCurrentDensityVector3The end vector (
t= 1).tdoubleThe interpolation parameter. Values outside [0, 1] extrapolate.
Returns
- ElectricCurrentDensityVector3
The interpolated ElectricCurrentDensityVector3.
LerpClamped(ElectricCurrentDensityVector3, ElectricCurrentDensityVector3, double)
Linearly interpolates between two vectors, with t clamped to [0, 1].
public static ElectricCurrentDensityVector3 LerpClamped(ElectricCurrentDensityVector3 a, ElectricCurrentDensityVector3 b, double t)
Parameters
aElectricCurrentDensityVector3The start vector (
t= 0).bElectricCurrentDensityVector3The end vector (
t= 1).tdoubleThe interpolation parameter, clamped to [0, 1].
Returns
- ElectricCurrentDensityVector3
The interpolated ElectricCurrentDensityVector3, always between
aandb.
Multiply(double)
Scales the vector by a scalar factor.
public ElectricCurrentDensityVector3 Multiply(double scalar)
Parameters
scalardoubleThe scalar factor.
Returns
- ElectricCurrentDensityVector3
The scaled vector.
Negate()
Negates all components.
public ElectricCurrentDensityVector3 Negate()
Returns
- ElectricCurrentDensityVector3
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(ElectricCurrentDensityVector3)
Subtracts two vectors component-wise.
public ElectricCurrentDensityVector3 Subtract(ElectricCurrentDensityVector3 other)
Parameters
otherElectricCurrentDensityVector3The vector to subtract.
Returns
- ElectricCurrentDensityVector3
The component-wise difference.
Operators
operator +(ElectricCurrentDensityVector3, ElectricCurrentDensityVector3)
Adds two vectors component-wise.
public static ElectricCurrentDensityVector3 operator +(ElectricCurrentDensityVector3 left, ElectricCurrentDensityVector3 right)
Parameters
leftElectricCurrentDensityVector3The left operand.
rightElectricCurrentDensityVector3The right operand.
Returns
- ElectricCurrentDensityVector3
The component-wise sum.
operator /(ElectricCurrentDensityVector3, double)
Divides the vector by a scalar divisor.
public static ElectricCurrentDensityVector3 operator /(ElectricCurrentDensityVector3 left, double scalar)
Parameters
leftElectricCurrentDensityVector3The vector to divide.
scalardoubleThe scalar divisor.
Returns
- ElectricCurrentDensityVector3
The divided vector.
operator *(double, ElectricCurrentDensityVector3)
Scales the vector by a scalar factor. Operands may be supplied in either order.
public static ElectricCurrentDensityVector3 operator *(double scalar, ElectricCurrentDensityVector3 right)
Parameters
scalardoubleThe scalar factor.
rightElectricCurrentDensityVector3The vector to scale.
Returns
- ElectricCurrentDensityVector3
The scaled vector.
operator *(ElectricCurrentDensityVector3, double)
Scales the vector by a scalar factor.
public static ElectricCurrentDensityVector3 operator *(ElectricCurrentDensityVector3 left, double scalar)
Parameters
leftElectricCurrentDensityVector3The vector to scale.
scalardoubleThe scalar factor.
Returns
- ElectricCurrentDensityVector3
The scaled vector.
operator -(ElectricCurrentDensityVector3, ElectricCurrentDensityVector3)
Subtracts two vectors component-wise.
public static ElectricCurrentDensityVector3 operator -(ElectricCurrentDensityVector3 left, ElectricCurrentDensityVector3 right)
Parameters
leftElectricCurrentDensityVector3The left operand.
rightElectricCurrentDensityVector3The right operand.
Returns
- ElectricCurrentDensityVector3
The component-wise difference.
operator -(ElectricCurrentDensityVector3)
Negates all components.
public static ElectricCurrentDensityVector3 operator -(ElectricCurrentDensityVector3 value)
Parameters
valueElectricCurrentDensityVector3The vector to negate.
Returns
- ElectricCurrentDensityVector3
A vector with all components negated.