• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

openmc-dev / openmc / 13379335826

17 Feb 2025 10:12PM UTC coverage: 85.006% (+0.04%) from 84.969%
13379335826

Pull #2655

github

web-flow
Merge 43ace3523 into a5b26de04
Pull Request #2655: Raytrace plots

406 of 446 new or added lines in 5 files covered. (91.03%)

1 existing line in 1 file now uncovered.

50439 of 59336 relevant lines covered (85.01%)

35462929.07 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

60.0
/src/position.cpp
1
#include "openmc/position.h"
2

3
namespace openmc {
4

5
//==============================================================================
6
// Position implementation
7
//==============================================================================
8

9
Position& Position::operator+=(Position other)
2,147,483,647✔
10
{
11
  x += other.x;
2,147,483,647✔
12
  y += other.y;
2,147,483,647✔
13
  z += other.z;
2,147,483,647✔
14
  return *this;
2,147,483,647✔
15
}
16

17
Position& Position::operator+=(double v)
×
18
{
19
  x += v;
×
20
  y += v;
×
21
  z += v;
×
22
  return *this;
×
23
}
24

25
Position& Position::operator-=(Position other)
2,147,483,647✔
26
{
27
  x -= other.x;
2,147,483,647✔
28
  y -= other.y;
2,147,483,647✔
29
  z -= other.z;
2,147,483,647✔
30
  return *this;
2,147,483,647✔
31
}
32

33
Position& Position::operator-=(double v)
×
34
{
35
  x -= v;
×
36
  y -= v;
×
37
  z -= v;
×
38
  return *this;
×
39
}
40

41
Position& Position::operator*=(Position other)
17,704,140✔
42
{
43
  x *= other.x;
17,704,140✔
44
  y *= other.y;
17,704,140✔
45
  z *= other.z;
17,704,140✔
46
  return *this;
17,704,140✔
47
}
48

49
Position& Position::operator*=(double v)
2,147,483,647✔
50
{
51
  x *= v;
2,147,483,647✔
52
  y *= v;
2,147,483,647✔
53
  z *= v;
2,147,483,647✔
54
  return *this;
2,147,483,647✔
55
}
56

57
Position& Position::operator/=(Position other)
×
58
{
59
  x /= other.x;
×
60
  y /= other.y;
×
61
  z /= other.z;
×
62
  return *this;
×
63
}
64

65
Position& Position::operator/=(double v)
2,147,483,647✔
66
{
67
  x /= v;
2,147,483,647✔
68
  y /= v;
2,147,483,647✔
69
  z /= v;
2,147,483,647✔
70
  return *this;
2,147,483,647✔
71
}
72

73
Position Position::operator-() const
4,381,044✔
74
{
75
  return {-x, -y, -z};
4,381,044✔
76
}
77

UNCOV
78
std::ostream& operator<<(std::ostream& os, Position r)
×
79
{
80
  os << "(" << r.x << ", " << r.y << ", " << r.z << ")";
×
81
  return os;
×
82
}
83

84
} // namespace openmc
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc