#include <math.h>
|
static real_t | ToDegree (real_t rad) |
|
static real_t | ToRadian (real_t deg) |
|
static real_t | GetL2Distance (const Real3 &pos1, const Real3 &pos2) |
|
template<std::size_t N> |
static MathArray< real_t, N > | CrossProduct (const MathArray< real_t, N > &a, const MathArray< real_t, N > &b) |
|
static Real3 | Perp3 (const Real3 &a, real_t random) |
|
static Real3 | RotAroundAxis (const Real3 &vector, real_t theta, const Real3 &axis) |
|
static real_t | AngleRadian (const Real3 &a, const Real3 &b) |
|
static Real3 | ProjectionOnto (const Real3 &a, const Real3 &b) |
|
static real_t | MSE (const std::vector< real_t > &v1, const std::vector< real_t > &v2) |
| Returns the mean squared error between two vectors. More...
|
|
Definition at line 31 of file math.h.
◆ AngleRadian()
Returns the angle (in radian) between two vectors.
- Parameters
-
a | the first vector |
b | the second vector |
- Returns
- the angle between them.
Definition at line 108 of file math.h.
◆ CrossProduct()
Returns the cross product of two vectors.
- Parameters
-
- Returns
- result the cross product of a and b (a x b)
Definition at line 54 of file math.h.
◆ GetL2Distance()
static real_t bdm::Math::GetL2Distance |
( |
const Real3 & |
pos1, |
|
|
const Real3 & |
pos2 |
|
) |
| |
|
inlinestatic |
◆ MSE()
static real_t bdm::Math::MSE |
( |
const std::vector< real_t > & |
v1, |
|
|
const std::vector< real_t > & |
v2 |
|
) |
| |
|
inlinestatic |
Returns the mean squared error between two vectors.
Definition at line 122 of file math.h.
◆ Perp3()
Returns a vector of norm 1 perpendicular to a 3D vector. As usual there is no length check.
- Parameters
-
- Returns
- a perpendicular vector
Definition at line 68 of file math.h.
◆ ProjectionOnto()
static Real3 bdm::Math::ProjectionOnto |
( |
const Real3 & |
a, |
|
|
const Real3 & |
b |
|
) |
| |
|
inlinestatic |
Returns the projection of the first vector onto the second one.
- Parameters
-
- Returns
- the projection of a onto b
Definition at line 116 of file math.h.
◆ RotAroundAxis()
Performs a rotation of a 3D vector vector
around a given axis axis
, in the positive mathematical sens.
- Parameters
-
[in] | vector | the vector we want to rotate |
[in] | theta | the amplitude of rotation (in radian) |
[in] | axis | (also a vector) |
- Returns
- the vector after rotation
Definition at line 92 of file math.h.
◆ ToDegree()
◆ ToRadian()
◆ kInfinity
constexpr real_t bdm::Math::kInfinity = 1e20 |
|
staticconstexpr |
Helpful constant to identify 'infinity'.
Definition at line 35 of file math.h.
◆ kPi
constexpr real_t bdm::Math::kPi = static_cast<real_t>(TMath::Pi()) |
|
staticconstexpr |
value of pi
Definition at line 33 of file math.h.
The documentation for this struct was generated from the following file: