simple structure representing a 2d vector and the operations we will perform with it
| 71 | McBool& isDerivedFromSrcMesh); |
| 72 | // simple structure representing a 2d vector and the operations we will perform with it |
| 73 | struct vec2 |
| 74 | { |
| 75 | union |
| 76 | { |
| 77 | struct |
| 78 | { |
| 79 | McDouble x, y; |
| 80 | }; |
| 81 | struct |
| 82 | { |
| 83 | McDouble u, v; |
| 84 | }; |
| 85 | }; |
| 86 | |
| 87 | vec2 operator*(const McDouble c) const |
| 88 | { |
| 89 | vec2 result = {{0.0, 0.0}}; |
| 90 | result.x = x * c; |
| 91 | result.y = y * c; |
| 92 | return result; |
| 93 | } |
| 94 | |
| 95 | vec2 operator+(const vec2& rhs) const |
| 96 | { |
| 97 | vec2 result = {{0.0, 0.0}}; |
| 98 | result.x = x + rhs.x; |
| 99 | result.y = y + rhs.y; |
| 100 | return result; |
| 101 | } |
| 102 | |
| 103 | vec2 operator-(const vec2& rhs) const |
| 104 | { |
| 105 | vec2 result = {{0.0, 0.0}}; |
| 106 | result.x = x - rhs.x; |
| 107 | result.y = y - rhs.y; |
| 108 | return result; |
| 109 | } |
| 110 | }; |
| 111 | |
| 112 | |
| 113 | // simple structure representing a 3d vector and the operations we will perform with it |
no outgoing calls
no test coverage detected