GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 73.3% 11 / 0 / 15
Functions: 66.7% 4 / 0 / 6
Branches: 75.0% 3 / 0 / 4

src/utilities/geometry/EulerAngles.cpp
Line Branch Exec Source
1 /***********************************************************************************************************************
2 * OpenStudio(R), Copyright (c) Alliance for Energy Innovation, LLC.
3 * See also https://openstudio.net/license
4 ***********************************************************************************************************************/
5
6 #include "EulerAngles.hpp"
7
8 namespace openstudio {
9
10 /// default constructor with no rotation
11 ✗ EulerAngles::EulerAngles() : m_storage(3, 0.0) {}
12
13 /// constructor with psi, theta, phi
14 1228 EulerAngles::EulerAngles(double psi, double theta, double phi) : m_storage(3) {
15
1/1
✓ Branch 1 taken 1228 times.
1228 m_storage[0] = psi;
16
1/1
✓ Branch 1 taken 1228 times.
1228 m_storage[1] = theta;
17
1/1
✓ Branch 1 taken 1228 times.
1228 m_storage[2] = phi;
18 1228 }
19
20 /// get psi
21 1228 double EulerAngles::psi() const {
22 1228 return m_storage[0];
23 }
24
25 /// get theta
26 1228 double EulerAngles::theta() const {
27 1228 return m_storage[1];
28 }
29
30 /// get phi
31 1228 double EulerAngles::phi() const {
32 1228 return m_storage[2];
33 }
34
35 /// ostream operator
36 ✗ std::ostream& operator<<(std::ostream& os, const EulerAngles& angles) {
37 ✗ os << "[" << angles.psi() << ", " << angles.theta() << ", " << angles.phi() << "]";
38 ✗ return os;
39 }
40
41 } // namespace openstudio
42