![]() |
|
Functions | |
| std::ostream & | operator<< (std::ostream &os, const Quaternion &a) |
| std::istream & | operator>> (std::istream &is, Quaternion &a) |
| Quaternion | operator+ (const Mdouble a, const Quaternion &b) |
| Quaternion | operator- (const Mdouble a, const Quaternion &b) |
| Quaternion | operator- (const Quaternion &a) |
| Quaternion | operator* (const Mdouble a, const Quaternion &b) |
| Quaternion operator* | ( | const Mdouble | a, |
| const Quaternion & | b | ||
| ) |
Multiplies each element of a given quaternion (b) by a given scalar (a). NB: this is a global function and a friend of the Quaternion class. Gets called when a scalar multiplication of the form (Mdouble) * (Quaternion) is performed.
| [in] | a | the scalar |
| [in] | b | the quaternion |
| Quaternion operator+ | ( | const Mdouble | a, |
| const Quaternion & | b | ||
| ) |
Adds a scalar to the elements of given quaternion NB this is a global function and a friend of the Quaternion class. Gets called when addition operation of the form (Mdouble) + (Quaternion) is performed.
| [in] | a | the scalar to be added |
| [in] | b | the quaternion the scalar gets added to. |
| Quaternion operator- | ( | const Mdouble | a, |
| const Quaternion & | b | ||
| ) |
Subtracts each element of a given quaternion from a scalar NB this is a global function and a friend of the Quaternion class. Gets called when subtraction operation of the form (Mdouble) - (Quaternion) is performed.
| [in] | a | the scalar |
| [in] | b | the quaternion to be subtracted the scalar gets subtracted from. |
| Quaternion operator- | ( | const Quaternion & | a | ) |
Returns the negative of a given quaternion. NB: this is a global function and a friend of the Quaternion class. Gets called when a negation operation of the form - (Quaternion) is performed.
| [in] | a | the quaternion to be negated |
| std::ostream& operator<< | ( | std::ostream & | os, |
| const Quaternion & | a | ||
| ) |
Adds all elements of the quaternion to an output stream. NB: this is a global function and a friend of the Quaternion class!
| [in] | os | the output stream, |
| [in] | a | The quaternion of interest |
| std::istream& operator>> | ( | std::istream & | is, |
| Quaternion & | a | ||
| ) |
Reads all elements of a given quaternion from an input stream. NB: this is a global function and a friend of the Quaternion class!
| [in,out] | is | the input stream |
| [in,out] | a | the quaternion to be read in |