set length
| 120 | |
| 121 | /// set length |
| 122 | bool Vector3d::setLength(double newLength) { |
| 123 | bool result = false; |
| 124 | double currentLength = length(); |
| 125 | if (currentLength > 0) { |
| 126 | double mult = newLength / currentLength; |
| 127 | m_storage[0] *= mult; |
| 128 | m_storage[1] *= mult; |
| 129 | m_storage[2] *= mult; |
| 130 | result = true; |
| 131 | } |
| 132 | return result; |
| 133 | } |
| 134 | |
| 135 | /// orthogonal right |
| 136 | Vector3d Vector3d::orthogonalRight() const { |
no outgoing calls
no test coverage detected