MCPcopy Create free account
hub / github.com/EricLengyel/Terathon-Math-Library / DualNum

Class DualNum

TSDualNum.h:27–151  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25 /// where <i>t&espilon;</i><sup>2</sup>&#x202F;0.
26
27 class DualNum
28 {
29 public:
30
31 float s, t;
32
33 /// \brief Default constructor that leaves the components uninitialized.
34
35 inline DualNum() = default;
36
37 DualNum(const DualNum& d)
38 {
39 s = d.s;
40 t = d.t;
41 }
42
43 /// \brief Constructor that sets components explicitly.
44 /// \param a The real part.
45 /// \param b The dual part.
46
47 DualNum(float a, float b)
48 {
49 s = a;
50 t = b;
51 }
52
53 /// \brief Sets both components of a dual number.
54 /// \param a The real part.
55 /// \param b The dual part.
56
57 DualNum& Set(float a, float b)
58 {
59 s = a;
60 t = b;
61 return (*this);
62 }
63
64 void Set(float a, float b) volatile
65 {
66 s = a;
67 t = b;
68 }
69
70 DualNum& operator =(const DualNum& d)
71 {
72 s = d.s;
73 t = d.t;
74 return (*this);
75 }
76
77 void operator =(const DualNum& d) volatile
78 {
79 s = d.s;
80 t = d.t;
81 }
82
83 DualNum& operator =(float a)
84 {

Callers 15

operator -Function · 0.85
operator +Function · 0.85
operator *Function · 0.85
operator /Function · 0.85
WedgeDotFunction · 0.85
AntiwedgeDotFunction · 0.85
InverseFunction · 0.85
SqrtFunction · 0.85
InverseSqrtFunction · 0.85
AntiInverseFunction · 0.85
AntiSqrtFunction · 0.85
AntiInverseSqrtFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected