This class describes a dual number. More...
Useful functions | |
SBQuantity::dimensionless * | a |
The first component of the dual number. | |
SBQuantity::dimensionless * | b |
The second component of the dual number. | |
SBDTypeDual | inverse () const |
Returns the inverse of the dual number. | |
SBDTypeDual | squareRoot () const |
Returns the square root of the dual number. | |
void | print () const |
Prints the dual number. | |
Constructors and destructor | |
SBDTypeDual () | |
Constructs a dual number with both components set to zero. | |
SBDTypeDual (double a, double b) | |
Constructs a dual number with components a and b . | |
SBDTypeDual (const SBQuantity::dimensionless &a, const SBQuantity::dimensionless &b) | |
Constructs a dual number with components a and b . | |
~SBDTypeDual () | |
Destructs the dual number. | |
Serialization | |
virtual bool | isSerializable () const |
Returns true. | |
virtual void | serialize (SBCSerializer *serializer, const SBVersionNumber &sdkVersionNumber=SB_SDK_VERSION_NUMBER) const |
Serializes the dual number. | |
virtual void | unserialize (SBCSerializer *serializer, const SBVersionNumber &sdkVersionNumber=SB_SDK_VERSION_NUMBER) |
Unserializes the dual number. | |
Operators | |
SBDTypeDual | operator+ (const SBDTypeDual &d) const |
Returns the sum of this dual number with dual number d . | |
SBDTypeDual | operator- (const SBDTypeDual &d) const |
Returns the difference between this dual number and dual number d . | |
SBDTypeDual | operator* (const SBDTypeDual &d) const |
Returns the product of this dual number with dual number d . | |
SBDTypeDual | operator/ (const SBDTypeDual &d) const |
Returns the division of this dual number by dual number d . | |
SBDTypeDual | operator* (double d) const |
Returns the product of this dual number with double d . | |
SBDTypeDual | operator* (const SBQuantity::dimensionless &d) const |
Returns the product of this dual number with dimensionless quantity d . | |
SBDTypeDual & | operator+= (const SBDTypeDual &d) |
Adds dual number d to this dual number. | |
SBDTypeDual & | operator-= (const SBDTypeDual &d) |
Subtracts dual number d from this dual number. | |
SBDTypeDual & | operator*= (const SBDTypeDual &d) |
Multiplies this dual number with dual number d . | |
SBDTypeDual & | operator/= (const SBDTypeDual &d) |
Divides this dual number by dual number d . | |
SBDTypeDual & | operator*= (double d) |
Multiplies this dual number with double d . | |
SBDTypeDual & | operator*= (const SBQuantity::dimensionless &d) |
Multiplies this dual number with dimensionless quantity d . | |
SBDTypeDual | operator- () const |
Returns the opposite of this dual number. | |
This class describes dual numbers. Dual numbers are pairs of dimensionless physical quantities, that are mainly used in conjunction with dual quaternions.
Short name: SBDual