opynsim
Unofficial C++ Documentation
Loading...
Searching...
No Matches
Namespaces | Functions
geometric_functions.h File Reference
#include <liboscar/maths/vector.h>
#include <cmath>
#include <concepts>
#include <cstddef>
#include <type_traits>
Include dependency graph for geometric_functions.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  osc
 

Functions

template<std::floating_point T>
T osc::sqrt (T num)
 
template<std::floating_point T>
T osc::inversesqrt (T x)
 
template<typename T >
requires std::is_arithmetic_v<T>
constexpr T osc::dot (T x, T y)
 
template<typename T , size_t N>
requires std::is_arithmetic_v<T>
constexpr T osc::dot (const Vector< T, N > &x, const Vector< T, N > &y)
 
template<typename T >
requires std::is_arithmetic_v<T>
constexpr Vector< T, 3 > osc::cross (const Vector< T, 3 > &x, const Vector< T, 3 > &y)
 
template<std::floating_point T, size_t N>
T osc::length (const Vector< T, N > &v)
 
template<std::floating_point T, size_t N>
constexpr T osc::length2 (const Vector< T, N > &v)
 
template<std::floating_point T, size_t N>
Vector< T, Nosc::normalize (const Vector< T, N > &v)
 
template<std::integral T, std::floating_point FloatingPointResult = float>
constexpr FloatingPointResult osc::aspect_ratio_of (Vector< T, 2 > v)
 
template<std::floating_point T>
constexpr T osc::aspect_ratio_of (Vector< T, 2 > v)
 
template<typename T >
requires std::is_arithmetic_v<T>
constexpr T osc::area_of (const Vector< T, 2 > &v)