mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-25 04:25:29 -04:00
63 lines
886 B
C++
63 lines
886 B
C++
#include "openmc/position.h"
|
|
|
|
namespace openmc {
|
|
|
|
//==============================================================================
|
|
// Position implementation
|
|
//==============================================================================
|
|
|
|
Position&
|
|
Position::operator+=(Position other)
|
|
{
|
|
x += other.x;
|
|
y += other.y;
|
|
z += other.z;
|
|
return *this;
|
|
}
|
|
|
|
Position&
|
|
Position::operator+=(double v)
|
|
{
|
|
x += v;
|
|
y += v;
|
|
z += v;
|
|
return *this;
|
|
}
|
|
|
|
Position&
|
|
Position::operator-=(Position other)
|
|
{
|
|
x -= other.x;
|
|
y -= other.y;
|
|
z -= other.z;
|
|
return *this;
|
|
}
|
|
|
|
Position&
|
|
Position::operator-=(double v)
|
|
{
|
|
x -= v;
|
|
y -= v;
|
|
z -= v;
|
|
return *this;
|
|
}
|
|
|
|
Position&
|
|
Position::operator*=(Position other)
|
|
{
|
|
x *= other.x;
|
|
y *= other.y;
|
|
z *= other.z;
|
|
return *this;
|
|
}
|
|
|
|
Position&
|
|
Position::operator*=(double v)
|
|
{
|
|
x *= v;
|
|
y *= v;
|
|
z *= v;
|
|
return *this;
|
|
}
|
|
|
|
} // namespace openmc
|