![]() |
galaxy 1.0.0
Real-Time C++23 Game Programming Framework. Built on data-driven design principles and agile software engineering.
|
Classes | |
struct | fnv_1a_params |
Base specialization for fnv1a params. More... | |
struct | fnv_1a_params< std::uint32_t > |
Fnv1a 32 bit specialization. More... | |
struct | fnv_1a_params< std::uint64_t > |
Fnv1a 64 bit specialization. More... | |
Concepts | |
concept | valid_fnv_bits |
Concept to enforce fnv bit types. | |
Typedefs | |
template<typename Type > | |
using | conditional_distribution |
Source: http://stackoverflow.com/a/32907541. | |
Functions | |
std::string | encode_base64 (const std::string &input) |
Compresses string into Base64. | |
std::string | decode_base64 (const std::string &input) |
Decompresses string into Base64. | |
template<valid_fnv_bits bits = std::uint64_t> | |
constexpr bits | fnv1a (const char *const str, const bits value=fnv_1a_params< bits >::offset) noexcept |
Convert string to hash. | |
constexpr std::uint32_t | fnv1a_32 (const char *const str) noexcept |
Convert string to 32bit hash. | |
constexpr std::uint64_t | fnv1a_64 (const char *const str) noexcept |
Convert string to 64bit hash. | |
template<meta::is_arithmetic Arithmetic> | |
float constexpr | normalize (const Arithmetic val, const Arithmetic max) noexcept |
Calc normalized value from range. | |
glm::vec2 | random_vec2 (const glm::vec2 &min, const glm::vec2 &max) noexcept |
Generate a random vec2. | |
glm::vec3 | random_vec3 (const glm::vec3 &min, const glm::vec3 &max) noexcept |
Generate a random vec3. | |
glm::vec4 | random_vec4 (const glm::vec4 &min, const glm::vec4 &max) noexcept |
Generate a random vec4. | |
template<meta::is_arithmetic T> | |
T | random (const T min, const T max) noexcept |
Generate a random number of type T. | |
using galaxy::math::conditional_distribution |
Source: http://stackoverflow.com/a/32907541.
Definition at line 27 of file Random.hpp.
|
nodiscard |
Compresses string into Base64.
The MIT License (MIT) Copyright(c) 2016 tomykaira
input | Input data to convert. |
Definition at line 51 of file Base64.cpp.
|
nodiscard |
Decompresses string into Base64.
The MIT License (MIT) Copyright(c) 2016 tomykaira
input | Input data to convert. |
Definition at line 105 of file Base64.cpp.
|
inlineconstexprnoexcept |
Convert string to hash.
bits | 32 or 64 bit type. |
str | String to hash. |
value | Hashing value passed recursively. |
Definition at line 64 of file FNV1a.hpp.
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlinenodiscardconstexprnoexcept |
|
nodiscardnoexcept |
Generate a random vec2.
min | Minimum vec2 inclusive. |
max | Maximum vec2 inclusive. |
Definition at line 14 of file Random.cpp.
|
nodiscardnoexcept |
Generate a random vec3.
min | Minimum vec3 inclusive. |
max | Maximum vec3 inclusive. |
Definition at line 19 of file Random.cpp.
|
nodiscardnoexcept |
Generate a random vec4.
min | Minimum vec4 inclusive. |
max | Maximum vec4 inclusive. |
Definition at line 24 of file Random.cpp.
|
inlinenodiscardnoexcept |
Generate a random number of type T.
T | The type of number to return. Must be arithmetic. |
min | Minimum number inclusive. |
max | Maximum number inclusive. |
Definition at line 44 of file Random.hpp.