Euphoria
eu Namespace Reference

Namespaces

 assertlib
 
 colorutil
 
 common
 
 convert
 
 core
 
 files
 
 gui
 
 io
 
 log
 
 minsynth
 
 render
 
 search
 
 string_mergers
 
 tests
 
 window
 

Classes

struct  Aabb
 
struct  Angle
 
struct  AxisAngle
 
struct  InterpolateDefault
 
struct  MatchedEnum
 
struct  EnumToStringImplementation
 
struct  Lrud
 Generic version of a CSS like padding type. More...
 
struct  StringParser< Lrud< T > >
 Parses a Lrud according to the CSS spec. More...
 
struct  mat2f
 
struct  mat3f
 
struct  mat4f
 
struct  MemoryChunk
 
struct  MemoryChunkFile
 
struct  DirectoryListing
 
struct  Plane
 
struct  PolarCoordinate
 
struct  quatf
 
struct  Random
 WEL512 Random Number Generator. More...
 
struct  Range
 
struct  UnitRay3f
 
struct  Ray2f
 
struct  Ray3f
 
struct  Rectf
 
struct  Recti
 
struct  Result
 
struct  Rgbi
 
struct  Rgbai
 
struct  Rgb
 
struct  Hsl
 
struct  Rgba
 
struct  StringParser< Rgbi >
 
struct  size2f
 
struct  size2i
 
struct  StringParser< size2f >
 
struct  StringParser< size2i >
 
struct  StringParser
 
struct  StringBuilder
 
struct  StringMerger
 
struct  NormalizedAndLength
 
struct  vec2f
 
struct  vec2i
 
struct  unit2f
 
struct  Scale2f
 
struct  Scale3f
 
struct  vec3f
 
struct  unit3f
 
struct  vec4f
 

Typedefs

using I64 = std::int64_t
 
using I32 = std::int32_t
 
using I16 = std::int16_t
 
using I8 = std::int8_t
 
using U64 = std::uint64_t
 
using U32 = std::uint32_t
 
using U16 = std::uint16_t
 
using U8 = std::uint8_t
 

Enumerations

enum class  NamedColor {
  white , light_gray , gray , dark_gray ,
  black , red , pure_red , blue ,
  pure_blue , light_blue , normal_blue , cornflower_blue ,
  green , pure_green , light_green , yellow ,
  pure_yellow , orange , pure_orange , brown ,
  pure_brown , purple , pure_purple , pink ,
  pure_pink , pure_beige , tan , pure_tan ,
  cyan , pure_cyan
}
 
enum class  BangWongPalette {
  black , organge , blue_sky , green_bluish ,
  yellow , blue , red_vermillion , purple_redish
}
 
enum class  IsAbsolute { yes , no }
 
enum class  CharToStringStyle { smart , include_hex }
 

Functions

std::string to_string (const Aabb &a)
 
vec3f get_random_point (Random *rand, const Aabb &a)
 
Angle get_random_angle (::eu::Random *random)
 
float sin (const Angle &ang)
 
float cos (const Angle &ang)
 
float tan (const Angle &ang)
 
Angle asin (float v)
 
Angle acos (float v)
 
Angle atan (float v)
 
Angle atan2 (float y, float x)
 
Angle operator+ (const Angle &lhs, const Angle &rhs)
 
Angle operator- (const Angle &lhs, const Angle &rhs)
 
Angle operator/ (const Angle &lhs, float rhs)
 
Angle operator* (const Angle &lhs, float rhs)
 
Angle operator* (float rhs, const Angle &lhs)
 
std::string to_string (const Angle &a)
 
bool operator< (const Angle &lhs, const Angle &rhs)
 
bool operator<= (const Angle &lhs, const Angle &rhs)
 
bool operator> (const Angle &lhs, const Angle &rhs)
 
bool operator>= (const Angle &lhs, const Angle &rhs)
 
Angle lerp_angle (const Angle &from, float v, const Angle &to)
 
 DEFAULT_INTERPOLATE (Angle, lerp_angle)
 
std::string to_string (const AxisAngle &aa)
 
int c_sizet_to_int (size_t t)
 
int c_unsigned_int_to_int (unsigned int i)
 
unsigned int c_int_to_unsigned_int (int i)
 
size_t c_int_to_sizet (int i)
 
U8 c_int_to_u8 (unsigned int i)
 
int c_u64_to_int (U64 u)
 
constexpr int c_float_to_int (float f)
 
constexpr float c_sizet_to_float (std::size_t f)
 
constexpr float c_int_to_float (int i)
 
constexpr float c_u64_to_float (U64 i)
 
constexpr U32 c_bit_signed_to_unsigned (I32 i)
 
constexpr double c_float_to_double (float f)
 
constexpr float c_double_to_float (double f)
 
template<typename T >
default_interpolate (const T &from, float t, const T &to)
 
std::string add_quotes_and_combine_with_english_or (const std::vector< std::string > &matches)
 
template<typename T , std::enable_if_t< StringParser< T >::value !=0, int > = 0>
Result< T > default_parse_function (const std::string &value)
 
template<typename T , std::enable_if_t< std::is_enum< T >::value==false, int > = 0>
std::optional< std::string > default_describe ()
 
template<typename T , std::enable_if_t< StringParser< T >::value !=0, int > = 0>
std::string from_default_value_to_string (const T &t)
 
int calc_edit_distance (const std::string &source, const std::string &target)
 
int calc_edit_distance_fast (const std::string &the_row, const std::string &the_col)
 
template<typename T >
std::string from_enum_to_string (T t)
 
template<typename T >
EnumToStringImplementation< T > get_enum_to_string_implementation_from_enum ()
 
template<typename T >
MatchedEnum< T > from_string_to_enum (const std::string &input, size_t max_size=5)
 
template<typename T >
std::vector< std::string > from_enum_to_string (const std::vector< T > &ts)
 
template<typename T >
std::vector< std::string > get_all_names_from_enum ()
 
template<typename T >
std::vector< T > get_all_values_from_enum ()
 
template<typename A , typename B >
std::vector< std::pair< A, B > > zip (const std::vector< A > &as, const std::vector< B > &bs)
 
template<typename A , typename B >
std::vector< std::pair< A, B > > zip_longest (const std::vector< A > &as, const std::vector< B > &bs, A da=A(), B db=B())
 
template<typename T , typename F = T, typename C >
std::vector< T > map (const std::vector< F > &fs, C convert)
 
template<typename T , typename K , typename V , typename C >
std::vector< T > map (const std::map< K, V > &fs, C convert)
 
template<typename T , typename C >
std::vector< T > filter (const std::vector< T > &ts, C check)
 
template<typename T , typename C >
bool all (const std::vector< T > &ts, C check)
 
template<typename T , typename C >
bool any (const std::vector< T > &ts, C check)
 
template<typename T , typename R = T, typename C >
fold (const std::vector< T > &ts, C concat, R zero)
 
template<typename T >
bool operator== (const Lrud< T > &lhs, const Lrud< T > &rhs)
 
template<typename T >
bool operator!= (const Lrud< T > &lhs, const Lrud< T > &rhs)
 
std::string to_string (const mat2f &m)
 
mat2f operator+ (const mat2f &lhs, const mat2f &rhs)
 
mat2f operator- (const mat2f &lhs, const mat2f &rhs)
 
float get_component_multiply_sum (const vec2f &lhs, const vec2f &rhs)
 
mat2f operator* (const mat2f &lhs, const mat2f &rhs)
 
vec2f operator* (const mat2f &lhs, const vec2f &rhs)
 
std::string to_string (const mat3f &m)
 
mat3f operator+ (const mat3f &lhs, const mat3f &rhs)
 
mat3f operator- (const mat3f &lhs, const mat3f &rhs)
 
float get_component_multiply_sum (const vec3f &lhs, const vec3f &rhs)
 
mat3f operator* (const mat3f &lhs, const mat3f &rhs)
 
vec3f operator* (const mat3f &lhs, const vec3f &rhs)
 
std::string to_string (const mat4f &m)
 
mat4f operator+ (const mat4f &lhs, const mat4f &rhs)
 
mat4f operator- (const mat4f &lhs, const mat4f &rhs)
 
float get_component_multiply_sum (const vec4f &lhs, const vec4f &rhs)
 
mat4f operator* (const mat4f &lhs, const mat4f &rhs)
 
vec4f operator* (const mat4f &lhs, const vec4f &rhs)
 
void copy_to_memory (MemoryChunk *memory, const void *src)
 
std::shared_ptr< MemoryChunkcreate_memory_chunk_from_string (const std::string &content)
 
template<std::size_t count, typename T , typename TContainer , typename TExtract >
std::pair< std::array< T, count >, std::array< T, count > > find_min_max_ranges (const TContainer &ts, TExtract extract)
 
template<typename T , typename TContainer , typename TExtract >
Range< T > find_min_max_range (const TContainer &ts, TExtract extract)
 
template<typename T , typename TContainer , typename TMinFunc , typename TMaxFunc >
std::tuple< T, T > find_min_max (const TContainer &ts, TMinFunc min_func, TMaxFunc max_func)
 
bool is_equal (int lhs, int rhs)
 
bool is_zero (int r)
 
float clamp_zero (float r)
 
float floor (float v)
 
float ceil (float v)
 
int floor_to_int (float v)
 
int ceil_to_int (float v)
 
int get_sign (float r)
 Calculates the sign as a positive or a negative int. More...
 
int get_sign (int r)
 
float get_sign (bool b)
 Returns either 1 or -1. More...
 
float lerp_float (float f, float scale, float t)
 
float square (float r)
 
float sqrt (float r)
 
float mod (float numer, float denumer)
 
bool is_within_inclusive_as_int (int min, int c, int max)
 
float round (float num, float gran)
 Rounds a value to the nearest nice value. More...
 
constexpr float abs (float r)
 
constexpr bool is_zero (float r)
 
constexpr bool is_equal (float lhs, float rhs)
 
 DEFAULT_INTERPOLATE (float, lerp_float)
 
template<typename T >
get_default_if_close_to_zero (T value, T def, T epsilon)
 
template<typename I >
constexpr bool is_each_nth (I i, I each)
 returns true for a index each Nth loop. More...
 
std::optional< int > locale_parse_int (const std::string &str)
 
std::optional< float > locale_parse_float (const std::string &str)
 
std::optional< bool > locale_parse_bool (const std::string &str)
 
template<typename T >
std::optional< T > locale_parse_generic (const std::string &str)
 
std::string get_current_directory ()
 
DirectoryListing list_directory (const std::string &path)
 
bool ends_with (const std::string &str, char c)
 
std::string join_path (const std::string &left, const std::string &right)
 
std::string get_extension (const std::string &path)
 
std::string get_file_name_including_extension (const std::string &path)
 
std::string get_file_name_without_extension (const std::string &path)
 
unit3f get_random_unit3 (Random *random)
 
quatf lerp_quatf (const quatf &f, const float scale, const quatf &t)
 
quatf slerp_fast (const quatf &qa, const float t, const quatf &qb)
 
quatf slerp_shortway (const quatf &from, const float scale, const quatf &to)
 
std::string to_string (const quatf &v)
 
float dot (const quatf &lhs, const quatf &rhs)
 
quatf operator* (const quatf &lhs, const quatf &rhs)
 
quatf operator* (float scale, const quatf &q)
 
quatf operator* (const quatf &q, float scale)
 
quatf operator+ (const quatf &lhs, const quatf &rhs)
 
quatf operator- (const quatf &lhs, const quatf &rhs)
 
 DEFAULT_INTERPOLATE (quatf, slerp_shortway)
 
float get_random_gaussian_float01 (Random *rand)
 
float get_random_gaussian (Random *rand, float mean, float std_dev)
 
float get_random_gaussian (Random *rand, float mean, float std_dev, const Range< float > &r)
 
vec2f get_random_point_on_unit_circle_center_focused (Random *r)
 
vec2f get_random_point_on_unit_circle_uniform (Random *r)
 
template<typename T >
get_random_in_range (Random *rand, const Range< T > &range)
 
template<typename T >
get_random_in_range (Random *rand, T min, T max)
 
template<typename T >
get_random_in_range (Random *rand, T max)
 
template<typename T >
const T & get_random_item_in_vector (Random *r, const std::vector< T > &v)
 
template<typename T >
const T & get_random_item_in_vector (Random *r, const ranges::span< T > &v)
 
float from_01f (float lower_bound, float upper_bound, float value)
 
template<>
float from_01 (const Range< float > &range, float value)
 
template<typename T >
Range< T > make_range (T min, T max)
 
template<typename T >
Range< T > make_range (T max)
 
template<typename T >
Range< int > make_range (const std::vector< T > &v)
 
template<typename T >
from_01 (const Range< T > &range, float value)
 
template<typename T >
float to01 (const Range< T > &range, T value)
 
template<typename T >
get360_angular (const Range< T > &range, float value)
 
template<typename T , typename F >
remap_to (const Range< F > &from, const Range< T > &to, F value)
 
template<typename T >
bool is_within (const Range< T > &range, T value)
 
template<typename T >
keep_within (const Range< T > &range, T value)
 
template<typename T >
wrap (const Range< T > &range, T value)
 
vec2f to01 (const Rectf &r, const vec2f &from)
 
vec2f from_01 (const Rectf &r, const vec2f &from)
 
bool is_within (const Rectf &r, const vec2f &p)
 
std::string to_string (const Rectf &r)
 
vec2f to01 (const Recti &r, const vec2i &from)
 
vec2i from_01 (const Recti &r, const vec2f &from)
 
bool is_within (const Recti &r, const vec2i &p)
 
bool operator== (const Recti &lhs, const Recti &rhs)
 
std::string to_string (const Recti &r)
 
vec2f get_random_point (Random *random, const Rectf &r)
 
vec2i get_random_point (Random *random, const Recti &r)
 
Rgb operator+ (const Rgb &lhs, const Rgb &rhs)
 
Rgb operator- (const Rgb &lhs, const Rgb &rhs)
 
Rgb operator* (const Rgb &lhs, const Rgb &rhs)
 
Rgb operator/ (const Rgb &lhs, float rhs)
 
Rgb operator* (const Rgb &lhs, float rhs)
 
Rgb operator* (float lhs, const Rgb &rhs)
 
float dot (const Rgb &lhs, const Rgb &rhs)
 
Rgb clamp (const Rgb &c)
 
std::string to_string (const Rgbi &c)
 
std::string to_string (const Rgbai &c)
 
std::string to_string (const Rgb &v)
 
std::string to_string (const Rgba &v)
 
std::string to_string (const Hsl &v)
 
bool operator== (const Rgbi &lhs, const Rgbi &rhs)
 
bool operator!= (const Rgbi &lhs, const Rgbi &rhs)
 
bool operator== (const Rgbai &lhs, const Rgbai &rhs)
 
bool operator!= (const Rgbai &lhs, const Rgbai &rhs)
 
Rgb to_rgb (const Rgbi &c)
 
Rgb to_rgb (const Rgba &c)
 
Rgb to_rgb (const Rgbai &c)
 
Rgb to_rgb (const Hsl &hsl)
 
Hsl to_hsl (const Rgb &c)
 
Rgbi to_rgbi (const Rgb &c)
 
Rgbi to_rgbi (const Rgba &c)
 
Rgbi to_rgbi (const Rgbai &c)
 
Rgba to_rgba (const Rgbai &c)
 
Rgbai to_rgbai (const Rgba &c)
 
Rgb lerp_rgb (const Rgb &from, float v, const Rgb &to)
 
std::string to_js_hex_color (const Rgbi &c)
 
std::string to_html_rgb (const Rgbi &c)
 
Hsl get_saturated (const Hsl &ahsl, float amount, IsAbsolute method)
 
Hsl get_desaturated (const Hsl &ahsl, float amount, IsAbsolute method)
 
Hsl get_lightened (const Hsl &ahsl, float amount, IsAbsolute method)
 
Hsl get_darkened (const Hsl &ahsl, float amount, IsAbsolute method)
 
Rgb get_shaded_color (const Rgb &color, float percentage)
 Makes a color brighter or darker. More...
 
Result< Rgbito_rgbi (const std::string &original_value)
 
 DEFAULT_INTERPOLATE (Rgb, lerp_rgb)
 
size2f min (const size2f lhs, const size2f rhs)
 
size2f max (const size2f lhs, const size2f rhs)
 
size2f operator+ (const size2f &lhs, const size2f &rhs)
 
size2f operator- (const size2f &lhs, const size2f &rhs)
 
size2f operator* (const size2f &lhs, float rhs)
 
size2f operator* (float lhs, const size2f &rhs)
 
size2f operator/ (const size2f &lhs, float rhs)
 
std::string to_string (const size2f &r)
 
size2i min (const size2i lhs, const size2i rhs)
 
size2i max (const size2i lhs, const size2i rhs)
 
size2i operator+ (const size2i &lhs, const size2i &rhs)
 
size2i operator- (const size2i &lhs, const size2i &rhs)
 
size2i operator* (const size2i &lhs, int rhs)
 
size2i operator* (int lhs, const size2i &rhs)
 
std::string to_string (const size2i &r)
 
size2f min (const size2f &lhs, const size2f &rhs)
 
size2i min (const size2i &lhs, const size2i &rhs)
 
size2f max (const size2f &lhs, const size2f &rhs)
 
size2i max (const size2i &lhs, const size2i &rhs)
 
template<typename T >
std::string to_string_for_custom_argparser (const T &t)
 
template<typename T >
Result< T > parse_for_custom_argparser (const std::string &value)
 
std::pair< std::string, std::string > get_last_string (const std::string &str, char sep)
 for hello.dog gets .dog More...
 
std::string get_first_chars (const std::string &str, std::size_t count)
 
std::string get_first_chars_with_ellipsis (const std::string &str, unsigned int count)
 
std::string strip_last_string (const std::string &str, char sep)
 for hello.dog and . gets hello More...
 
std::string trim_right (const std::string &string_to_trim, std::string_view trim_characters=space_characters)
 Remove characters from the right, stops at a invalid character. More...
 
std::string trim_left (const std::string &string_to_trim, std::string_view trim_characters=space_characters)
 Remove characters from the left, stops at invalid character. More...
 
std::string trim (const std::string &string_to_trim, std::string_view trim_characters=space_characters)
 Remove characters from both the start and the end. More...
 
bool begins_with (const std::string &string_to_test, const std::string &start)
 Tests if a string starts with another string. More...
 
bool ends_with (const std::string &string_to_test, const std::string &end)
 Tests if a string ends with another string. More...
 
char to_lower_char (char b)
 
char to_upper_char (char b)
 
std::string to_lower (const std::string &str)
 Generate a string containing only lower characters. More...
 
std::vector< std::string > to_lower (const std::vector< std::string > &str)
 
std::string to_upper (const std::string &str)
 
std::string from_char_to_string (char c, CharToStringStyle style)
 
std::string::size_type find_first_index_of_mismatch (const std::string &lhs, const std::string &rhs)
 
void replace_all (std::string *string, const std::string &to_find, const std::string &to_replace)
 Replace all occurrences in a string. More...
 
std::string replace_all (const std::string &string, const std::string &to_find, const std::string &to_replace)
 Replace all occurrences in a string. More...
 
void copy (char *dst, const std::string &src, const std::string::size_type &count)
 Copy a string to a character buffer, adding null terminator at the end. More...
 
std::string replace_with_character (const std::string &string, const std::string &to_find, char to_replace)
 
std::string remove_from_end (const std::string &str, const std::string &end)
 
std::string strip (const std::string &str, const std::string &ch)
 
std::string remove_consecutive (const std::string &str, const std::string &ch)
 
std::vector< std::string > split (const std::string &s, char delim)
 
std::vector< std::string > split_on_spaces (const std::string &string)
 
std::string get_string_or_empty (bool b, const std::string &str)
 
bool is_number (char b)
 
int parse_number (const char **aa)
 
int compare_string (const std::string &lhs, const std::string &rhs)
 
template<typename TKey , typename TValue >
std::vector< std::string > to_string_vector (const std::map< TKey, TValue > &map)
 
template<typename TKey , typename TValue >
std::vector< std::string > from_key_to_string_vector (const std::map< TKey, TValue > &map)
 
template<typename T >
std::vector< std::string > to_string_vector (const std::vector< T > &data)
 
template<typename T , typename C >
std::vector< std::string > to_string_vector (const std::vector< T > &data, C callback)
 
vec2f operator+ (const vec2f &lhs, const vec2f &rhs)
 Math operators. More...
 
vec2f operator- (const vec2f &lhs, const vec2f &rhs)
 
vec2f operator* (const vec2f &lhs, float rhs)
 
vec2f operator* (float lhs, const vec2f &rhs)
 
vec2f operator* (const unit2f &lhs, float rhs)
 
vec2f operator* (float lhs, const unit2f &rhs)
 
vec2f operator/ (const vec2f &lhs, float rhs)
 
vec2i operator+ (const vec2i &lhs, const vec2i &rhs)
 
vec2i operator- (const vec2i &lhs, const vec2i &rhs)
 
vec2i operator* (const vec2i &lhs, int rhs)
 
vec2i operator* (int lhs, const vec2i &rhs)
 
bool operator== (const vec2i &lhs, const vec2i &rhs)
 Equality operators. More...
 
bool operator!= (const vec2i &lhs, const vec2i &rhs)
 
float dot (const vec2f &lhs, const vec2f &rhs)
 Functions. More...
 
vec2f lerp_vec2f (const vec2f &from, float v, const vec2f &to)
 Transform. More...
 
vec2i lerp_vec2i (const vec2i &from, float v, const vec2i &to)
 
std::string to_string (const vec2f &v)
 Printing. More...
 
std::string to_string (const unit2f &v)
 
std::string to_string (const vec2i &v)
 
unit2f create_random_unit (Random *random)
 
 DEFAULT_INTERPOLATE (vec2f, lerp_vec2f)
 
 DEFAULT_INTERPOLATE (vec2i, lerp_vec2i)
 
vec3f operator+ (const vec3f &lhs, const vec3f &rhs)
 Math operators. More...
 
vec3f operator- (const vec3f &lhs, const vec3f &rhs)
 
vec3f operator* (float lhs, const vec3f &rhs)
 
vec3f operator* (const vec3f &lhs, float rhs)
 
vec3f operator/ (const vec3f &lhs, float rhs)
 
vec3f operator/ (float lhs, const vec3f &rhs)
 
vec3f lerp_vec3f (const vec3f &f, float v, const vec3f &t)
 Functions. More...
 
std::string to_string (const vec3f &v)
 Transformations. More...
 
std::string to_string (const unit3f &v)
 
std::string to_string (const Scale3f &v)
 
constexpr vec3f min (const vec3f &lhs, const vec3f &rhs)
 
constexpr vec3f max (const vec3f &lhs, const vec3f &rhs)
 
std::string to_string (const vec4f &v)
 

Variables

constexpr Angle one_turn = Angle::from_radians(pi * 2.0f)
 
constexpr Angle half_turn = Angle::from_radians(pi)
 
constexpr Angle quarter_turn = Angle::from_radians(pi / 2.0f)
 
constexpr Angle no_rotation = Angle::from_radians(0.0f)
 
constexpr mat2f m2_identity = mat2f::from_scalar(1)
 
constexpr mat3f m3_identity = mat3f::from_scalar(1)
 
constexpr mat4f m4_identity = mat4f::from_scalar(1)
 
constexpr float pi = 3.1415926535897932384626433832795f
 
constexpr char path_separator = '/'
 
constexpr quatf q_identity = quatf(1, vec3f(0, 0, 0))
 
constexpr Range< float > r01 = { 0.0f, 1.0f}
 
constexpr Range< float > r11 = { -1.0f, 1.0}
 
constexpr std::string_view space_characters = " \n\r\t"
 Space characters. More...
 
constexpr vec2f zero2f = vec2f{ 0, 0 }
 
constexpr vec2i zero2i = vec2i{ 0, 0 }
 
constexpr vec3f zero3f = vec3f{ 0.0f, 0.0f, 0.0f }
 

Typedef Documentation

◆ I16

using eu::I16 = typedef std::int16_t

Definition at line 9 of file ints.h.

◆ I32

using eu::I32 = typedef std::int32_t

Definition at line 8 of file ints.h.

◆ I64

using eu::I64 = typedef std::int64_t

Definition at line 7 of file ints.h.

◆ I8

using eu::I8 = typedef std::int8_t

Definition at line 10 of file ints.h.

◆ U16

using eu::U16 = typedef std::uint16_t

Definition at line 14 of file ints.h.

◆ U32

using eu::U32 = typedef std::uint32_t

Definition at line 13 of file ints.h.

◆ U64

using eu::U64 = typedef std::uint64_t

Definition at line 12 of file ints.h.

◆ U8

using eu::U8 = typedef std::uint8_t

Definition at line 15 of file ints.h.

Enumeration Type Documentation

◆ BangWongPalette

enum eu::BangWongPalette
strong
Enumerator
black 
organge 
blue_sky 
green_bluish 
yellow 
blue 
red_vermillion 
purple_redish 

Definition at line 162 of file colors.h.

◆ IsAbsolute

enum eu::IsAbsolute
strong
Enumerator
yes 
no 

Definition at line 119 of file rgb.h.

◆ NamedColor

enum eu::NamedColor
strong
Enumerator
white 
light_gray 
gray 
dark_gray 
black 
red 
pure_red 
blue 
pure_blue 
light_blue 
normal_blue 
cornflower_blue 
green 
pure_green 
light_green 
yellow 
pure_yellow 
orange 
pure_orange 
brown 
pure_brown 
purple 
pure_purple 
pink 
pure_pink 
pure_beige 
tan 
pure_tan 
cyan 
pure_cyan 

Definition at line 11 of file colors.h.

Function Documentation

◆ abs()

constexpr float eu::abs ( float  r)
constexpr

Definition at line 8 of file numeric.h.

◆ acos()

Angle eu::acos ( float  v)

Definition at line 91 of file angle.cc.

◆ add_quotes_and_combine_with_english_or()

std::string eu::add_quotes_and_combine_with_english_or ( const std::vector< std::string > &  matches)

Definition at line 10 of file default_parse.cc.

◆ all()

template<typename T , typename C >
bool eu::all ( const std::vector< T > &  ts,
check 
)

Definition at line 105 of file functional.h.

◆ any()

template<typename T , typename C >
bool eu::any ( const std::vector< T > &  ts,
check 
)

Definition at line 122 of file functional.h.

◆ asin()

Angle eu::asin ( float  v)

Definition at line 82 of file angle.cc.

◆ atan()

Angle eu::atan ( float  v)

Definition at line 100 of file angle.cc.

◆ atan2()

Angle eu::atan2 ( float  y,
float  x 
)

Definition at line 107 of file angle.cc.

◆ c_bit_signed_to_unsigned()

constexpr U32 eu::c_bit_signed_to_unsigned ( I32  i)
constexpr

Definition at line 64 of file cint.h.

◆ c_double_to_float()

constexpr float eu::c_double_to_float ( double  f)
constexpr

Definition at line 80 of file cint.h.

◆ c_float_to_double()

constexpr double eu::c_float_to_double ( float  f)
constexpr

Definition at line 73 of file cint.h.

◆ c_float_to_int()

constexpr int eu::c_float_to_int ( float  f)
constexpr

Definition at line 36 of file cint.h.

◆ c_int_to_float()

constexpr float eu::c_int_to_float ( int  i)
constexpr

Definition at line 50 of file cint.h.

◆ c_int_to_sizet()

size_t eu::c_int_to_sizet ( int  i)

Definition at line 35 of file cint.cc.

◆ c_int_to_u8()

U8 eu::c_int_to_u8 ( unsigned int  i)

Definition at line 42 of file cint.cc.

◆ c_int_to_unsigned_int()

unsigned int eu::c_int_to_unsigned_int ( int  i)

Definition at line 27 of file cint.cc.

◆ c_sizet_to_float()

constexpr float eu::c_sizet_to_float ( std::size_t  f)
constexpr

Definition at line 43 of file cint.h.

◆ c_sizet_to_int()

int eu::c_sizet_to_int ( size_t  t)

Definition at line 11 of file cint.cc.

◆ c_u64_to_float()

constexpr float eu::c_u64_to_float ( U64  i)
constexpr

Definition at line 57 of file cint.h.

◆ c_u64_to_int()

int eu::c_u64_to_int ( U64  u)

Definition at line 49 of file cint.cc.

◆ c_unsigned_int_to_int()

int eu::c_unsigned_int_to_int ( unsigned int  i)

Definition at line 19 of file cint.cc.

◆ calc_edit_distance()

int eu::calc_edit_distance ( const std::string &  source,
const std::string &  target 
)

Definition at line 14 of file editdistance.cc.

◆ calc_edit_distance_fast()

int eu::calc_edit_distance_fast ( const std::string &  the_row,
const std::string &  the_col 
)

Definition at line 86 of file editdistance.cc.

◆ ceil()

float eu::ceil ( float  v)

Definition at line 42 of file numeric.cc.

◆ ceil_to_int()

int eu::ceil_to_int ( float  v)

Definition at line 56 of file numeric.cc.

◆ clamp()

Rgb eu::clamp ( const Rgb c)

Definition at line 144 of file rgb.cc.

◆ clamp_zero()

float eu::clamp_zero ( float  r)

Definition at line 27 of file numeric.cc.

◆ copy_to_memory()

void eu::copy_to_memory ( MemoryChunk memory,
const void *  src 
)

Definition at line 60 of file memorychunk.cc.

◆ cos()

float eu::cos ( const Angle ang)

Definition at line 68 of file angle.cc.

◆ create_memory_chunk_from_string()

std::shared_ptr< MemoryChunk > eu::create_memory_chunk_from_string ( const std::string &  content)

Definition at line 66 of file memorychunk.cc.

◆ create_random_unit()

unit2f eu::create_random_unit ( Random random)

Definition at line 435 of file vec2.cc.

◆ default_describe()

template<typename T , std::enable_if_t< std::is_enum< T >::value==false, int > = 0>
std::optional< std::string > eu::default_describe ( )

Definition at line 107 of file default_parse.h.

◆ DEFAULT_INTERPOLATE() [1/6]

eu::DEFAULT_INTERPOLATE ( Angle  ,
lerp_angle   
)

◆ default_interpolate()

template<typename T >
T eu::default_interpolate ( const T &  from,
float  t,
const T &  to 
)

Definition at line 14 of file default_interpolate.h.

◆ DEFAULT_INTERPOLATE() [2/6]

eu::DEFAULT_INTERPOLATE ( float  ,
lerp_float   
)

◆ DEFAULT_INTERPOLATE() [3/6]

eu::DEFAULT_INTERPOLATE ( quatf  ,
slerp_shortway   
)

◆ DEFAULT_INTERPOLATE() [4/6]

eu::DEFAULT_INTERPOLATE ( Rgb  ,
lerp_rgb   
)

◆ DEFAULT_INTERPOLATE() [5/6]

eu::DEFAULT_INTERPOLATE ( vec2f  ,
lerp_vec2f   
)

◆ DEFAULT_INTERPOLATE() [6/6]

eu::DEFAULT_INTERPOLATE ( vec2i  ,
lerp_vec2i   
)

◆ default_parse_function()

template<typename T , std::enable_if_t< StringParser< T >::value !=0, int > = 0>
Result< T > eu::default_parse_function ( const std::string &  value)

Definition at line 20 of file default_parse.h.

◆ dot() [1/3]

float eu::dot ( const quatf lhs,
const quatf rhs 
)

Definition at line 363 of file quat.cc.

◆ dot() [2/3]

float eu::dot ( const Rgb lhs,
const Rgb rhs 
)

Definition at line 138 of file rgb.cc.

◆ dot() [3/3]

float eu::dot ( const vec2f lhs,
const vec2f rhs 
)

Functions.

Definition at line 400 of file vec2.cc.

◆ ends_with()

bool eu::ends_with ( const std::string &  str,
char  c 
)

Definition at line 139 of file os.cc.

◆ filter()

template<typename T , typename C >
std::vector<T> eu::filter ( const std::vector< T > &  ts,
check 
)

Definition at line 86 of file functional.h.

◆ find_min_max()

template<typename T , typename TContainer , typename TMinFunc , typename TMaxFunc >
std::tuple<T, T> eu::find_min_max ( const TContainer &  ts,
TMinFunc  min_func,
TMaxFunc  max_func 
)

Definition at line 86 of file minmax.h.

◆ find_min_max_range()

template<typename T , typename TContainer , typename TExtract >
Range<T> eu::find_min_max_range ( const TContainer &  ts,
TExtract  extract 
)

Definition at line 55 of file minmax.h.

◆ find_min_max_ranges()

template<std::size_t count, typename T , typename TContainer , typename TExtract >
std::pair<std::array<T, count>, std::array<T, count> > eu::find_min_max_ranges ( const TContainer &  ts,
TExtract  extract 
)

Definition at line 19 of file minmax.h.

◆ floor()

float eu::floor ( float  v)

Definition at line 35 of file numeric.cc.

◆ floor_to_int()

int eu::floor_to_int ( float  v)

Definition at line 49 of file numeric.cc.

◆ fold()

template<typename T , typename R = T, typename C >
R eu::fold ( const std::vector< T > &  ts,
concat,
zero 
)

Definition at line 147 of file functional.h.

◆ from_01() [1/4]

template<>
float eu::from_01 ( const Range< float > &  range,
float  value 
)

Definition at line 13 of file range.cc.

◆ from_01() [2/4]

template<typename T >
T eu::from_01 ( const Range< T > &  range,
float  value 
)

Definition at line 63 of file range.h.

◆ from_01() [3/4]

vec2f eu::from_01 ( const Rectf r,
const vec2f from 
)

Definition at line 952 of file rect.cc.

◆ from_01() [4/4]

vec2i eu::from_01 ( const Recti r,
const vec2f from 
)

Definition at line 989 of file rect.cc.

◆ from_01f()

float eu::from_01f ( float  lower_bound,
float  upper_bound,
float  value 
)

Definition at line 6 of file range.cc.

◆ from_default_value_to_string()

template<typename T , std::enable_if_t< StringParser< T >::value !=0, int > = 0>
std::string eu::from_default_value_to_string ( const T &  t)

Definition at line 137 of file default_parse.h.

◆ from_enum_to_string() [1/2]

template<typename T >
std::vector<std::string> eu::from_enum_to_string ( const std::vector< T > &  ts)

Definition at line 147 of file enumtostring.h.

◆ from_enum_to_string() [2/2]

template<typename T >
std::string eu::from_enum_to_string ( t)

Definition at line 116 of file enumtostring.h.

◆ from_string_to_enum()

template<typename T >
MatchedEnum<T> eu::from_string_to_enum ( const std::string &  input,
size_t  max_size = 5 
)

Definition at line 139 of file enumtostring.h.

◆ get360_angular()

template<typename T >
T eu::get360_angular ( const Range< T > &  range,
float  value 
)

Definition at line 92 of file range.h.

◆ get_all_names_from_enum()

template<typename T >
std::vector<std::string> eu::get_all_names_from_enum ( )

Definition at line 160 of file enumtostring.h.

◆ get_all_values_from_enum()

template<typename T >
std::vector<T> eu::get_all_values_from_enum ( )

Definition at line 167 of file enumtostring.h.

◆ get_component_multiply_sum() [1/3]

float eu::get_component_multiply_sum ( const vec2f lhs,
const vec2f rhs 
)

Definition at line 131 of file mat2.cc.

◆ get_component_multiply_sum() [2/3]

float eu::get_component_multiply_sum ( const vec3f lhs,
const vec3f rhs 
)

Definition at line 281 of file mat3.cc.

◆ get_component_multiply_sum() [3/3]

float eu::get_component_multiply_sum ( const vec4f lhs,
const vec4f rhs 
)

Definition at line 501 of file mat4.cc.

◆ get_current_directory()

std::string eu::get_current_directory ( )

Definition at line 35 of file os.cc.

◆ get_darkened()

Hsl eu::get_darkened ( const Hsl ahsl,
float  amount,
IsAbsolute  method 
)

Definition at line 486 of file rgb.cc.

◆ get_default_if_close_to_zero()

template<typename T >
T eu::get_default_if_close_to_zero ( value,
def,
epsilon 
)

Definition at line 132 of file numeric.h.

◆ get_desaturated()

Hsl eu::get_desaturated ( const Hsl ahsl,
float  amount,
IsAbsolute  method 
)

Definition at line 452 of file rgb.cc.

◆ get_enum_to_string_implementation_from_enum()

template<typename T >
EnumToStringImplementation<T> eu::get_enum_to_string_implementation_from_enum ( )

Definition at line 123 of file enumtostring.h.

◆ get_extension()

std::string eu::get_extension ( const std::string &  path)

Definition at line 165 of file os.cc.

◆ get_file_name_including_extension()

std::string eu::get_file_name_including_extension ( const std::string &  path)

Definition at line 171 of file os.cc.

◆ get_file_name_without_extension()

std::string eu::get_file_name_without_extension ( const std::string &  path)

Definition at line 186 of file os.cc.

◆ get_lightened()

Hsl eu::get_lightened ( const Hsl ahsl,
float  amount,
IsAbsolute  method 
)

Definition at line 469 of file rgb.cc.

◆ get_random_angle()

Angle eu::get_random_angle ( ::eu::Random random)

Definition at line 12 of file angle.cc.

◆ get_random_gaussian() [1/2]

float eu::get_random_gaussian ( Random rand,
float  mean,
float  std_dev 
)

Definition at line 104 of file random.cc.

◆ get_random_gaussian() [2/2]

float eu::get_random_gaussian ( Random rand,
float  mean,
float  std_dev,
const Range< float > &  r 
)

Definition at line 110 of file random.cc.

◆ get_random_gaussian_float01()

float eu::get_random_gaussian_float01 ( Random rand)

Definition at line 84 of file random.cc.

◆ get_random_in_range() [1/3]

template<typename T >
T eu::get_random_in_range ( Random rand,
const Range< T > &  range 
)

Definition at line 50 of file random.h.

◆ get_random_in_range() [2/3]

template<typename T >
T eu::get_random_in_range ( Random rand,
max 
)

Definition at line 62 of file random.h.

◆ get_random_in_range() [3/3]

template<typename T >
T eu::get_random_in_range ( Random rand,
min,
max 
)

Definition at line 56 of file random.h.

◆ get_random_item_in_vector() [1/2]

template<typename T >
const T& eu::get_random_item_in_vector ( Random r,
const ranges::span< T > &  v 
)

Definition at line 80 of file random.h.

◆ get_random_item_in_vector() [2/2]

template<typename T >
const T& eu::get_random_item_in_vector ( Random r,
const std::vector< T > &  v 
)

Definition at line 68 of file random.h.

◆ get_random_point() [1/3]

vec3f eu::get_random_point ( Random rand,
const Aabb a 
)

Definition at line 116 of file aabb.cc.

◆ get_random_point() [2/3]

vec2f eu::get_random_point ( Random random,
const Rectf r 
)

Definition at line 1023 of file rect.cc.

◆ get_random_point() [3/3]

vec2i eu::get_random_point ( Random random,
const Recti r 
)

Definition at line 1031 of file rect.cc.

◆ get_random_point_on_unit_circle_center_focused()

vec2f eu::get_random_point_on_unit_circle_center_focused ( Random r)

Definition at line 133 of file random.cc.

◆ get_random_point_on_unit_circle_uniform()

vec2f eu::get_random_point_on_unit_circle_uniform ( Random r)

Definition at line 142 of file random.cc.

◆ get_random_unit3()

unit3f eu::get_random_unit3 ( Random random)

Definition at line 42 of file polarcoord.cc.

◆ get_saturated()

Hsl eu::get_saturated ( const Hsl ahsl,
float  amount,
IsAbsolute  method 
)

Definition at line 435 of file rgb.cc.

◆ get_shaded_color()

Rgb eu::get_shaded_color ( const Rgb color,
float  percentage 
)

Makes a color brighter or darker.

The +1 makes it white, 0% is no change, -1 makes it black.

Definition at line 503 of file rgb.cc.

◆ get_sign() [1/3]

float eu::get_sign ( bool  b)

Returns either 1 or -1.

Definition at line 79 of file numeric.cc.

◆ get_sign() [2/3]

int eu::get_sign ( float  r)

Calculates the sign as a positive or a negative int.

Returns
1 if r is greater than 0, -1 if not.
See also
Abs()

Definition at line 63 of file numeric.cc.

◆ get_sign() [3/3]

int eu::get_sign ( int  r)

Definition at line 71 of file numeric.cc.

◆ is_each_nth()

template<typename I >
constexpr bool eu::is_each_nth ( i,
each 
)
constexpr

returns true for a index each Nth loop.

pass zero to always return false useful for example adding a newline each 10th or 15th line

Definition at line 142 of file numeric.h.

◆ is_equal() [1/2]

constexpr bool eu::is_equal ( float  lhs,
float  rhs 
)
constexpr

Definition at line 24 of file numeric.h.

◆ is_equal() [2/2]

bool eu::is_equal ( int  lhs,
int  rhs 
)

Definition at line 13 of file numeric.cc.

◆ is_within() [1/3]

template<typename T >
bool eu::is_within ( const Range< T > &  range,
value 
)

Definition at line 108 of file range.h.

◆ is_within() [2/3]

bool eu::is_within ( const Rectf r,
const vec2f p 
)

Definition at line 960 of file rect.cc.

◆ is_within() [3/3]

bool eu::is_within ( const Recti r,
const vec2i p 
)

Definition at line 997 of file rect.cc.

◆ is_within_inclusive_as_int()

bool eu::is_within_inclusive_as_int ( int  min,
int  c,
int  max 
)

Definition at line 116 of file numeric.cc.

◆ is_zero() [1/2]

constexpr bool eu::is_zero ( float  r)
constexpr

Definition at line 17 of file numeric.h.

◆ is_zero() [2/2]

bool eu::is_zero ( int  r)

Definition at line 20 of file numeric.cc.

◆ join_path()

std::string eu::join_path ( const std::string &  left,
const std::string &  right 
)

Definition at line 152 of file os.cc.

◆ keep_within()

template<typename T >
T eu::keep_within ( const Range< T > &  range,
value 
)

Definition at line 115 of file range.h.

◆ lerp_angle()

Angle eu::lerp_angle ( const Angle from,
float  v,
const Angle to 
)

Definition at line 194 of file angle.cc.

◆ lerp_float()

float eu::lerp_float ( float  f,
float  scale,
float  t 
)

Definition at line 87 of file numeric.cc.

◆ lerp_quatf()

quatf eu::lerp_quatf ( const quatf f,
const float  scale,
const quatf t 
)

Definition at line 214 of file quat.cc.

◆ lerp_rgb()

Rgb eu::lerp_rgb ( const Rgb from,
float  v,
const Rgb to 
)

Definition at line 410 of file rgb.cc.

◆ lerp_vec2f()

vec2f eu::lerp_vec2f ( const vec2f from,
float  v,
const vec2f to 
)

Transform.

Definition at line 406 of file vec2.cc.

◆ lerp_vec2i()

vec2i eu::lerp_vec2i ( const vec2i from,
float  v,
const vec2i to 
)

Definition at line 415 of file vec2.cc.

◆ lerp_vec3f()

vec3f eu::lerp_vec3f ( const vec3f f,
float  v,
const vec3f t 
)

Functions.

Transformations.

Definition at line 264 of file vec3.cc.

◆ list_directory()

DirectoryListing eu::list_directory ( const std::string &  path)

Definition at line 95 of file os.cc.

◆ locale_parse_bool()

std::optional< bool > eu::locale_parse_bool ( const std::string &  str)

Definition at line 35 of file numparse.cc.

◆ locale_parse_float()

std::optional< float > eu::locale_parse_float ( const std::string &  str)

Definition at line 25 of file numparse.cc.

◆ locale_parse_generic()

template<typename T >
std::optional<T> eu::locale_parse_generic ( const std::string &  str)

◆ locale_parse_int()

std::optional< int > eu::locale_parse_int ( const std::string &  str)

Definition at line 10 of file numparse.cc.

◆ make_range() [1/3]

template<typename T >
Range<int> eu::make_range ( const std::vector< T > &  v)

Definition at line 51 of file range.h.

◆ make_range() [2/3]

template<typename T >
Range<T> eu::make_range ( max)

Definition at line 45 of file range.h.

◆ make_range() [3/3]

template<typename T >
Range<T> eu::make_range ( min,
max 
)

Definition at line 39 of file range.h.

◆ map() [1/2]

template<typename T , typename K , typename V , typename C >
std::vector<T> eu::map ( const std::map< K, V > &  fs,
convert 
)

Definition at line 70 of file functional.h.

◆ map() [2/2]

template<typename T , typename F = T, typename C >
std::vector<T> eu::map ( const std::vector< F > &  fs,
convert 
)

Definition at line 56 of file functional.h.

◆ max() [1/5]

size2f eu::max ( const size2f lhs,
const size2f rhs 
)

◆ max() [2/5]

size2f eu::max ( const size2f  lhs,
const size2f  rhs 
)

Definition at line 149 of file size2.cc.

◆ max() [3/5]

size2i eu::max ( const size2i lhs,
const size2i rhs 
)

◆ max() [4/5]

size2i eu::max ( const size2i  lhs,
const size2i  rhs 
)

Definition at line 318 of file size2.cc.

◆ max() [5/5]

constexpr vec3f eu::max ( const vec3f lhs,
const vec3f rhs 
)
constexpr

Definition at line 178 of file vec3.h.

◆ min() [1/5]

size2f eu::min ( const size2f lhs,
const size2f rhs 
)

◆ min() [2/5]

size2f eu::min ( const size2f  lhs,
const size2f  rhs 
)

Definition at line 140 of file size2.cc.

◆ min() [3/5]

size2i eu::min ( const size2i lhs,
const size2i rhs 
)

◆ min() [4/5]

size2i eu::min ( const size2i  lhs,
const size2i  rhs 
)

Definition at line 309 of file size2.cc.

◆ min() [5/5]

constexpr vec3f eu::min ( const vec3f lhs,
const vec3f rhs 
)
constexpr

Definition at line 169 of file vec3.h.

◆ mod()

float eu::mod ( float  numer,
float  denumer 
)

Definition at line 109 of file numeric.cc.

◆ operator!=() [1/4]

template<typename T >
bool eu::operator!= ( const Lrud< T > &  lhs,
const Lrud< T > &  rhs 
)

Definition at line 88 of file lrud.h.

◆ operator!=() [2/4]

bool eu::operator!= ( const Rgbai lhs,
const Rgbai rhs 
)

Definition at line 221 of file rgb.cc.

◆ operator!=() [3/4]

bool eu::operator!= ( const Rgbi lhs,
const Rgbi rhs 
)

Definition at line 207 of file rgb.cc.

◆ operator!=() [4/4]

bool eu::operator!= ( const vec2i lhs,
const vec2i rhs 
)

Definition at line 393 of file vec2.cc.

◆ operator*() [1/26]

Angle eu::operator* ( const Angle lhs,
float  rhs 
)

Definition at line 149 of file angle.cc.

◆ operator*() [2/26]

mat2f eu::operator* ( const mat2f lhs,
const mat2f rhs 
)

Definition at line 138 of file mat2.cc.

◆ operator*() [3/26]

vec2f eu::operator* ( const mat2f lhs,
const vec2f rhs 
)

Definition at line 151 of file mat2.cc.

◆ operator*() [4/26]

mat3f eu::operator* ( const mat3f lhs,
const mat3f rhs 
)

Definition at line 290 of file mat3.cc.

◆ operator*() [5/26]

vec3f eu::operator* ( const mat3f lhs,
const vec3f rhs 
)

Definition at line 304 of file mat3.cc.

◆ operator*() [6/26]

mat4f eu::operator* ( const mat4f lhs,
const mat4f rhs 
)

Definition at line 510 of file mat4.cc.

◆ operator*() [7/26]

vec4f eu::operator* ( const mat4f lhs,
const vec4f rhs 
)

Definition at line 526 of file mat4.cc.

◆ operator*() [8/26]

quatf eu::operator* ( const quatf lhs,
const quatf rhs 
)

Definition at line 369 of file quat.cc.

◆ operator*() [9/26]

quatf eu::operator* ( const quatf q,
float  scale 
)

Definition at line 385 of file quat.cc.

◆ operator*() [10/26]

Rgb eu::operator* ( const Rgb lhs,
const Rgb rhs 
)

Definition at line 105 of file rgb.cc.

◆ operator*() [11/26]

Rgb eu::operator* ( const Rgb lhs,
float  rhs 
)

Definition at line 122 of file rgb.cc.

◆ operator*() [12/26]

size2f eu::operator* ( const size2f lhs,
float  rhs 
)

Definition at line 173 of file size2.cc.

◆ operator*() [13/26]

size2i eu::operator* ( const size2i lhs,
int  rhs 
)

Definition at line 342 of file size2.cc.

◆ operator*() [14/26]

vec2f eu::operator* ( const unit2f lhs,
float  rhs 
)

Definition at line 329 of file vec2.cc.

◆ operator*() [15/26]

vec2f eu::operator* ( const vec2f lhs,
float  rhs 
)

Definition at line 315 of file vec2.cc.

◆ operator*() [16/26]

vec2i eu::operator* ( const vec2i lhs,
int  rhs 
)

Definition at line 370 of file vec2.cc.

◆ operator*() [17/26]

vec3f eu::operator* ( const vec3f lhs,
float  rhs 
)

Definition at line 235 of file vec3.cc.

◆ operator*() [18/26]

Rgb eu::operator* ( float  lhs,
const Rgb rhs 
)

Definition at line 129 of file rgb.cc.

◆ operator*() [19/26]

size2f eu::operator* ( float  lhs,
const size2f rhs 
)

Definition at line 180 of file size2.cc.

◆ operator*() [20/26]

vec2f eu::operator* ( float  lhs,
const unit2f rhs 
)

Definition at line 336 of file vec2.cc.

◆ operator*() [21/26]

vec2f eu::operator* ( float  lhs,
const vec2f rhs 
)

Definition at line 322 of file vec2.cc.

◆ operator*() [22/26]

vec3f eu::operator* ( float  lhs,
const vec3f rhs 
)

Definition at line 227 of file vec3.cc.

◆ operator*() [23/26]

Angle eu::operator* ( float  rhs,
const Angle lhs 
)

Definition at line 156 of file angle.cc.

◆ operator*() [24/26]

quatf eu::operator* ( float  scale,
const quatf q 
)

Definition at line 377 of file quat.cc.

◆ operator*() [25/26]

size2i eu::operator* ( int  lhs,
const size2i rhs 
)

Definition at line 349 of file size2.cc.

◆ operator*() [26/26]

vec2i eu::operator* ( int  lhs,
const vec2i rhs 
)

Definition at line 378 of file vec2.cc.

◆ operator+() [1/11]

Angle eu::operator+ ( const Angle lhs,
const Angle rhs 
)

Definition at line 123 of file angle.cc.

◆ operator+() [2/11]

mat2f eu::operator+ ( const mat2f lhs,
const mat2f rhs 
)

Definition at line 114 of file mat2.cc.

◆ operator+() [3/11]

mat3f eu::operator+ ( const mat3f lhs,
const mat3f rhs 
)

Definition at line 264 of file mat3.cc.

◆ operator+() [4/11]

mat4f eu::operator+ ( const mat4f lhs,
const mat4f rhs 
)

Definition at line 484 of file mat4.cc.

◆ operator+() [5/11]

quatf eu::operator+ ( const quatf lhs,
const quatf rhs 
)

Definition at line 394 of file quat.cc.

◆ operator+() [6/11]

Rgb eu::operator+ ( const Rgb lhs,
const Rgb rhs 
)

Definition at line 89 of file rgb.cc.

◆ operator+() [7/11]

size2f eu::operator+ ( const size2f lhs,
const size2f rhs 
)

Definition at line 158 of file size2.cc.

◆ operator+() [8/11]

size2i eu::operator+ ( const size2i lhs,
const size2i rhs 
)

Definition at line 327 of file size2.cc.

◆ operator+() [9/11]

vec2f eu::operator+ ( const vec2f lhs,
const vec2f rhs 
)

Math operators.

Definition at line 301 of file vec2.cc.

◆ operator+() [10/11]

vec2i eu::operator+ ( const vec2i lhs,
const vec2i rhs 
)

Definition at line 353 of file vec2.cc.

◆ operator+() [11/11]

vec3f eu::operator+ ( const vec3f lhs,
const vec3f rhs 
)

Math operators.

Definition at line 210 of file vec3.cc.

◆ operator-() [1/11]

Angle eu::operator- ( const Angle lhs,
const Angle rhs 
)

Definition at line 132 of file angle.cc.

◆ operator-() [2/11]

mat2f eu::operator- ( const mat2f lhs,
const mat2f rhs 
)

Definition at line 123 of file mat2.cc.

◆ operator-() [3/11]

mat3f eu::operator- ( const mat3f lhs,
const mat3f rhs 
)

Definition at line 273 of file mat3.cc.

◆ operator-() [4/11]

mat4f eu::operator- ( const mat4f lhs,
const mat4f rhs 
)

Definition at line 493 of file mat4.cc.

◆ operator-() [5/11]

quatf eu::operator- ( const quatf lhs,
const quatf rhs 
)

Definition at line 403 of file quat.cc.

◆ operator-() [6/11]

Rgb eu::operator- ( const Rgb lhs,
const Rgb rhs 
)

Definition at line 97 of file rgb.cc.

◆ operator-() [7/11]

size2f eu::operator- ( const size2f lhs,
const size2f rhs 
)

Definition at line 166 of file size2.cc.

◆ operator-() [8/11]

size2i eu::operator- ( const size2i lhs,
const size2i rhs 
)

Definition at line 335 of file size2.cc.

◆ operator-() [9/11]

vec2f eu::operator- ( const vec2f lhs,
const vec2f rhs 
)

Definition at line 308 of file vec2.cc.

◆ operator-() [10/11]

vec2i eu::operator- ( const vec2i lhs,
const vec2i rhs 
)

Definition at line 362 of file vec2.cc.

◆ operator-() [11/11]

vec3f eu::operator- ( const vec3f lhs,
const vec3f rhs 
)

Definition at line 219 of file vec3.cc.

◆ operator/() [1/6]

Angle eu::operator/ ( const Angle lhs,
float  rhs 
)

Definition at line 141 of file angle.cc.

◆ operator/() [2/6]

Rgb eu::operator/ ( const Rgb lhs,
float  rhs 
)

Definition at line 113 of file rgb.cc.

◆ operator/() [3/6]

size2f eu::operator/ ( const size2f lhs,
float  rhs 
)

Definition at line 188 of file size2.cc.

◆ operator/() [4/6]

vec2f eu::operator/ ( const vec2f lhs,
float  rhs 
)

Definition at line 344 of file vec2.cc.

◆ operator/() [5/6]

vec3f eu::operator/ ( const vec3f lhs,
float  rhs 
)

Definition at line 244 of file vec3.cc.

◆ operator/() [6/6]

vec3f eu::operator/ ( float  lhs,
const vec3f rhs 
)

Definition at line 253 of file vec3.cc.

◆ operator<()

bool eu::operator< ( const Angle lhs,
const Angle rhs 
)

Definition at line 166 of file angle.cc.

◆ operator<=()

bool eu::operator<= ( const Angle lhs,
const Angle rhs 
)

Definition at line 173 of file angle.cc.

◆ operator==() [1/5]

template<typename T >
bool eu::operator== ( const Lrud< T > &  lhs,
const Lrud< T > &  rhs 
)

Definition at line 75 of file lrud.h.

◆ operator==() [2/5]

bool eu::operator== ( const Recti lhs,
const Recti rhs 
)

Definition at line 1005 of file rect.cc.

◆ operator==() [3/5]

bool eu::operator== ( const Rgbai lhs,
const Rgbai rhs 
)

Definition at line 214 of file rgb.cc.

◆ operator==() [4/5]

bool eu::operator== ( const Rgbi lhs,
const Rgbi rhs 
)

Definition at line 200 of file rgb.cc.

◆ operator==() [5/5]

bool eu::operator== ( const vec2i lhs,
const vec2i rhs 
)

Equality operators.

Definition at line 387 of file vec2.cc.

◆ operator>()

bool eu::operator> ( const Angle lhs,
const Angle rhs 
)

Definition at line 181 of file angle.cc.

◆ operator>=()

bool eu::operator>= ( const Angle lhs,
const Angle rhs 
)

Definition at line 188 of file angle.cc.

◆ parse_for_custom_argparser()

template<typename T >
Result<T> eu::parse_for_custom_argparser ( const std::string &  value)

Definition at line 30 of file string_io.h.

◆ parse_number()

int eu::parse_number ( const char **  aa)

Definition at line 478 of file stringutils.cc.

◆ remap_to()

template<typename T , typename F >
T eu::remap_to ( const Range< F > &  from,
const Range< T > &  to,
value 
)

Definition at line 101 of file range.h.

◆ round()

float eu::round ( float  num,
float  gran 
)

Rounds a value to the nearest nice value.

If the granularity is 1 the function rounds to the closest integer, at .5 the closest half integer, at 2 even integers etc...

Parameters
numthe number to round
granthe granularity

Definition at line 140 of file numeric.cc.

◆ sin()

float eu::sin ( const Angle ang)

Definition at line 61 of file angle.cc.

◆ slerp_fast()

quatf eu::slerp_fast ( const quatf qa,
const float  t,
const quatf qb 
)

Definition at line 221 of file quat.cc.

◆ slerp_shortway()

quatf eu::slerp_shortway ( const quatf from,
const float  scale,
const quatf to 
)

Definition at line 258 of file quat.cc.

◆ sqrt()

float eu::sqrt ( float  r)

Definition at line 101 of file numeric.cc.

◆ square()

float eu::square ( float  r)

Definition at line 94 of file numeric.cc.

◆ tan()

float eu::tan ( const Angle ang)

Definition at line 75 of file angle.cc.

◆ to01() [1/3]

template<typename T >
float eu::to01 ( const Range< T > &  range,
value 
)

Definition at line 84 of file range.h.

◆ to01() [2/3]

vec2f eu::to01 ( const Rectf r,
const vec2f from 
)

Definition at line 944 of file rect.cc.

◆ to01() [3/3]

vec2f eu::to01 ( const Recti r,
const vec2i from 
)

Definition at line 973 of file rect.cc.

◆ to_hsl()

Hsl eu::to_hsl ( const Rgb c)

Definition at line 291 of file rgb.cc.

◆ to_html_rgb()

std::string eu::to_html_rgb ( const Rgbi c)

Definition at line 427 of file rgb.cc.

◆ to_js_hex_color()

std::string eu::to_js_hex_color ( const Rgbi c)

Definition at line 422 of file rgb.cc.

◆ to_rgb() [1/4]

Rgb eu::to_rgb ( const Hsl hsl)

Definition at line 257 of file rgb.cc.

◆ to_rgb() [2/4]

Rgb eu::to_rgb ( const Rgba c)

Definition at line 240 of file rgb.cc.

◆ to_rgb() [3/4]

Rgb eu::to_rgb ( const Rgbai c)

Definition at line 246 of file rgb.cc.

◆ to_rgb() [4/4]

Rgb eu::to_rgb ( const Rgbi c)

Definition at line 229 of file rgb.cc.

◆ to_rgba()

Rgba eu::to_rgba ( const Rgbai c)

Definition at line 381 of file rgb.cc.

◆ to_rgbai()

Rgbai eu::to_rgbai ( const Rgba c)

Definition at line 395 of file rgb.cc.

◆ to_rgbi() [1/4]

Rgbi eu::to_rgbi ( const Rgb c)

Definition at line 352 of file rgb.cc.

◆ to_rgbi() [2/4]

Rgbi eu::to_rgbi ( const Rgba c)

Definition at line 363 of file rgb.cc.

◆ to_rgbi() [3/4]

Rgbi eu::to_rgbi ( const Rgbai c)

Definition at line 374 of file rgb.cc.

◆ to_rgbi() [4/4]

Result< Rgbi > eu::to_rgbi ( const std::string &  original_value)

Definition at line 637 of file rgb.cc.

◆ to_string() [1/23]

std::string eu::to_string ( const Aabb a)

Definition at line 110 of file aabb.cc.

◆ to_string() [2/23]

std::string eu::to_string ( const Angle a)

Definition at line 162 of file angle.cc.

◆ to_string() [3/23]

std::string eu::to_string ( const AxisAngle aa)

Definition at line 21 of file axisangle.cc.

◆ to_string() [4/23]

std::string eu::to_string ( const Hsl v)

Definition at line 190 of file rgb.cc.

◆ to_string() [5/23]

std::string eu::to_string ( const mat2f m)

Definition at line 107 of file mat2.cc.

◆ to_string() [6/23]

std::string eu::to_string ( const mat3f m)

Definition at line 257 of file mat3.cc.

◆ to_string() [7/23]

std::string eu::to_string ( const mat4f m)

Definition at line 477 of file mat4.cc.

◆ to_string() [8/23]

std::string eu::to_string ( const quatf v)

Definition at line 356 of file quat.cc.

◆ to_string() [9/23]

std::string eu::to_string ( const Rectf r)

Definition at line 967 of file rect.cc.

◆ to_string() [10/23]

std::string eu::to_string ( const Recti r)

Definition at line 1014 of file rect.cc.

◆ to_string() [11/23]

std::string eu::to_string ( const Rgb v)

Definition at line 180 of file rgb.cc.

◆ to_string() [12/23]

std::string eu::to_string ( const Rgba v)

Definition at line 185 of file rgb.cc.

◆ to_string() [13/23]

std::string eu::to_string ( const Rgbai c)

Definition at line 175 of file rgb.cc.

◆ to_string() [14/23]

std::string eu::to_string ( const Rgbi c)

Definition at line 170 of file rgb.cc.

◆ to_string() [15/23]

std::string eu::to_string ( const Scale3f v)

Definition at line 307 of file vec3.cc.

◆ to_string() [16/23]

std::string eu::to_string ( const size2f r)

Definition at line 195 of file size2.cc.

◆ to_string() [17/23]

std::string eu::to_string ( const size2i r)

Definition at line 356 of file size2.cc.

◆ to_string() [18/23]

std::string eu::to_string ( const unit2f v)

Definition at line 428 of file vec2.cc.

◆ to_string() [19/23]

std::string eu::to_string ( const unit3f v)

Definition at line 306 of file vec3.cc.

◆ to_string() [20/23]

std::string eu::to_string ( const vec2f v)

Printing.

Definition at line 425 of file vec2.cc.

◆ to_string() [21/23]

std::string eu::to_string ( const vec2i v)

Definition at line 431 of file vec2.cc.

◆ to_string() [22/23]

std::string eu::to_string ( const vec3f v)

Transformations.

Printing.

Printing

Definition at line 305 of file vec3.cc.

◆ to_string() [23/23]

std::string eu::to_string ( const vec4f v)

Definition at line 80 of file vec4.cc.

◆ to_string_for_custom_argparser()

template<typename T >
std::string eu::to_string_for_custom_argparser ( const T &  t)

Definition at line 23 of file string_io.h.

◆ wrap()

template<typename T >
T eu::wrap ( const Range< T > &  range,
value 
)

Definition at line 130 of file range.h.

◆ zip()

template<typename A , typename B >
std::vector<std::pair<A, B> > eu::zip ( const std::vector< A > &  as,
const std::vector< B > &  bs 
)

Definition at line 19 of file functional.h.

◆ zip_longest()

template<typename A , typename B >
std::vector<std::pair<A, B> > eu::zip_longest ( const std::vector< A > &  as,
const std::vector< B > &  bs,
da = A(),
db = B() 
)

Definition at line 33 of file functional.h.

Variable Documentation

◆ half_turn

constexpr Angle eu::half_turn = Angle::from_radians(pi)
constexpr

Definition at line 88 of file angle.h.

◆ m2_identity

constexpr mat2f eu::m2_identity = mat2f::from_scalar(1)
constexpr

Definition at line 75 of file mat2.h.

◆ m3_identity

constexpr mat3f eu::m3_identity = mat3f::from_scalar(1)
constexpr

Definition at line 97 of file mat3.h.

◆ m4_identity

constexpr mat4f eu::m4_identity = mat4f::from_scalar(1)
constexpr

Definition at line 118 of file mat4.h.

◆ no_rotation

constexpr Angle eu::no_rotation = Angle::from_radians(0.0f)
constexpr

Definition at line 90 of file angle.h.

◆ one_turn

constexpr Angle eu::one_turn = Angle::from_radians(pi * 2.0f)
constexpr

Definition at line 87 of file angle.h.

◆ path_separator

constexpr char eu::path_separator = '/'
constexpr

Definition at line 23 of file os.h.

◆ pi

constexpr float eu::pi = 3.1415926535897932384626433832795f
constexpr

Definition at line 127 of file numeric.h.

◆ q_identity

constexpr quatf eu::q_identity = quatf(1, vec3f(0, 0, 0))
constexpr

Definition at line 71 of file quat.h.

◆ quarter_turn

constexpr Angle eu::quarter_turn = Angle::from_radians(pi / 2.0f)
constexpr

Definition at line 89 of file angle.h.

◆ r01

constexpr Range<float> eu::r01 = { 0.0f, 1.0f}
constexpr

Definition at line 57 of file range.h.

◆ r11

constexpr Range<float> eu::r11 = { -1.0f, 1.0}
constexpr

Definition at line 58 of file range.h.

◆ zero2f

constexpr vec2f eu::zero2f = vec2f{ 0, 0 }
constexpr

Definition at line 68 of file vec2.h.

◆ zero2i

constexpr vec2i eu::zero2i = vec2i{ 0, 0 }
constexpr

Definition at line 99 of file vec2.h.

◆ zero3f

constexpr vec3f eu::zero3f = vec3f{ 0.0f, 0.0f, 0.0f }
constexpr

Definition at line 95 of file vec3.h.