Show / Hide Table of Contents

Struct SIUnits

SI units.

Implements
IEquatable<SIUnits>
Inherited Members
object.Equals(object, object)
object.GetType()
object.ReferenceEquals(object, object)
Namespace: SpiceSharp.Simulations.Variables
Assembly: SpiceSharp.dll
Syntax
public struct SIUnits : IEquatable<SIUnits>

Constructors

SIUnits(Fraction, Fraction, Fraction, Fraction, Fraction, Fraction, Fraction)

Initializes a new instance of the SIUnits struct.

Declaration
public SIUnits(Fraction s, Fraction m, Fraction kg, Fraction a, Fraction k, Fraction mol, Fraction cd)
Parameters
Type Name Description
Fraction s

The exponent for seconds.

Fraction m

The exponent for meters.

Fraction kg

The exponent for kilograms.

Fraction a

The exponent for amperes.

Fraction k

The exponent for kelvin.

Fraction mol

The exponent for moles.

Fraction cd

The exponent for candelas.

Fields

Ampere

Binary code for an SIUnits representing an Ampere (current).

Declaration
public const ulong Ampere = 134217728
Field Value
Type Description
ulong

Candela

Binary code for an SIUnits representing a Candela (luminous intensity).

Declaration
public const ulong Candela = 2251799813685248
Field Value
Type Description
ulong

Kelvin

Binary code for an SIUnits representing a Kelvin (temperature).

Declaration
public const ulong Kelvin = 34359738368
Field Value
Type Description
ulong

Kilogram

Binary code for an SIUnits representing a kilogram (weight).

Declaration
public const ulong Kilogram = 524288
Field Value
Type Description
ulong

Meter

Binary code for an SIUnits representing a meter (distance).

Declaration
public const ulong Meter = 2048
Field Value
Type Description
ulong

Mole

Binary code for an SIUnits representing a mole (amount of substance).

Declaration
public const ulong Mole = 8796093022208
Field Value
Type Description
ulong

Second

Binary code for an SIUnits representing a second (time).

Declaration
public const ulong Second = 8
Field Value
Type Description
ulong

Methods

Equals(SIUnits)

Determines whether the specified units are equal.

Declaration
public readonly bool Equals(SIUnits units)
Parameters
Type Name Description
SIUnits units

The units.

Returns
Type Description
bool

true if the specified SIUnits is equal to this instance; otherwise false.

Equals(object)

Determines whether the specified object, is equal to this instance.

Declaration
public override readonly bool Equals(object obj)
Parameters
Type Name Description
object obj

The object to compare with this instance.

Returns
Type Description
bool

true if the specified object is equal to this instance; otherwise, false.

Overrides
ValueType.Equals(object)

GetHashCode()

Returns a hash code for this instance.

Declaration
public override readonly int GetHashCode()
Returns
Type Description
int

A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.

Overrides
ValueType.GetHashCode()

Pow(Fraction)

Raises the units to a power.

Declaration
public readonly SIUnits Pow(Fraction exponent)
Parameters
Type Name Description
Fraction exponent

The exponent.

Returns
Type Description
SIUnits

The result.

ToString()

Converts to string.

Declaration
public override readonly string ToString()
Returns
Type Description
string

A string that represents this instance.

Overrides
ValueType.ToString()

Operators

operator /(SIUnits, SIUnits)

Implements the operator /.

Declaration
public static SIUnits operator /(SIUnits left, SIUnits right)
Parameters
Type Name Description
SIUnits left

The left argument.

SIUnits right

The right argument.

Returns
Type Description
SIUnits

The result of the operator.

operator ==(SIUnits, SIUnits)

Implements the operator ==.

Declaration
public static bool operator ==(SIUnits left, SIUnits right)
Parameters
Type Name Description
SIUnits left

The left argument.

SIUnits right

The right argument.

Returns
Type Description
bool

The result of the operator.

operator !=(SIUnits, SIUnits)

Implements the operator !=.

Declaration
public static bool operator !=(SIUnits left, SIUnits right)
Parameters
Type Name Description
SIUnits left

The left argument.

SIUnits right

The right argument.

Returns
Type Description
bool

The result of the operator.

operator *(SIUnits, SIUnits)

Implements the operator *.

Declaration
public static SIUnits operator *(SIUnits left, SIUnits right)
Parameters
Type Name Description
SIUnits left

The left argument.

SIUnits right

The right argument.

Returns
Type Description
SIUnits

The result of the operator.

Implements

IEquatable<T>

Extension Methods

Utility.ThrowIfNull<T>(T, string)

See Also

IEquatable<T>
In this article
Back to top Generated by DocFX