|
mal-math
C++20 mathematics library.
|
Functions | |
| template<AnyVec T> | |
| vec< T::size, std::remove_const_t< typename T::type > > | UnitRandom (std::mt19937 &gen) noexcept |
| Generates a unit vector with random direction. | |
| template<AnyVec T, AnyVec U> requires (T::size == U::size) | |
| vec< T::size, std::remove_const_t< typename T::type > > | RandomVector (std::mt19937 &gen, U const &from, U const &to) noexcept |
| Generates a random vector between two other vectors. | |
| template<AnyVec T, Primitive U> | |
| vec< T::size, std::remove_const_t< typename T::type > > | RandomVector (std::mt19937 &gen, U const &from, U const to) noexcept |
| Generates a random vector where each value should be between from and to. | |
|
inlinenoexcept |
Generates a random vector between two other vectors.
| T | Resulting vector type. |
| U | Input vector types. |
| gen | Reference to a random number generator. |
| from | Start vector. |
| to | End vector. |
from and to. Definition at line 40 of file random.hpp.
|
inlinenoexcept |
Generates a random vector where each value should be between from and to.
| T | Resulting vector type. |
| U | Input vector types. |
| gen | Reference to a random number generator. |
| from | Start vector. |
| to | End vector. |
from and primitive to. Definition at line 59 of file random.hpp.
|
inlinenoexcept |
Generates a unit vector with random direction.
| T | Any vector type. |
| gen | Reference to a random number generator. |
Definition at line 22 of file random.hpp.