Math Module
This module provides mathematical utilities for numerical computations.
Scalar Operations
-
template<typename T>
T sbody::squareRoot(T x) Square root of
x. Return0ifxis negative.- Parameters:
x – number
- Returns:
result
Warning
doxygenfunction: Unable to resolve function “sbody::hypotSquare” with arguments None in doxygen xml output for project “SBody” from directory: ../doxygen. Potential matches:
- template<typename T> T hypotSquare(T x, T y)
- template<typename T> T hypotSquare(T x, T y, T z)
Constants
Geometry
-
enum class sbody::Axis
Values:
-
enumerator X
-
enumerator Y
-
enumerator Z
-
enumerator X
-
template<typename T>
T sbody::sinTheta(T theta) - Template Parameters:
T –
- Parameters:
theta –
- Returns:
T
-
template<typename T>
T sbody::cosTheta(T theta) - Template Parameters:
T –
- Parameters:
theta –
- Returns:
T
-
template<typename T>
T sbody::dotCross(const boost::numeric::ublas::bounded_vector<T, 3> &x, const boost::numeric::ublas::bounded_vector<T, 3> &y, const boost::numeric::ublas::bounded_vector<T, 3> &z) Dot product of vector
xand the cross product of vectoryand vectorz. \(\vec{x}\cdot(\vec{y}\times\vec{z})\).- Parameters:
x – 3 dimensional vector
y – 3 dimensional vector
z – 3 dimensional vector
- Returns:
result
-
template<typename T>
T sbody::triangleArea(const boost::numeric::ublas::bounded_vector<T, 3> &x, const boost::numeric::ublas::bounded_vector<T, 3> &y, const boost::numeric::ublas::bounded_vector<T, 3> &z) Calculate the area of a triangle.
- Parameters:
a – side length
b – side length
c – side length
- Returns:
result
Special Functions
Warning
doxygenfunction: Cannot find function “sbody::CarlsonRC” in doxygen xml output for project “SBody” from directory: ../doxygen
Warning
doxygenfunction: Cannot find function “sbody::CarlsonRJ” in doxygen xml output for project “SBody” from directory: ../doxygen
Warning
doxygenfunction: Cannot find function “sbody::EllipticIntegral” in doxygen xml output for project “SBody” from directory: ../doxygen
Warning
doxygenfunction: Cannot find function “sbody::EllipticIntegral2Complex” in doxygen xml output for project “SBody” from directory: ../doxygen
Warning
doxygenfunction: Cannot find function “sbody::EllipticIntegral4Complex” in doxygen xml output for project “SBody” from directory: ../doxygen