diff --git a/number_8hpp_source.html b/number_8hpp_source.html
index 5acfadd..7de567a 100644
--- a/number_8hpp_source.html
+++ b/number_8hpp_source.html
@@ -144,14 +144,14 @@
-T clamp(const T &value, const T &min, const T &max)
Definition: number.impl.hpp:60
+T clamp(const T &value, const T &min, const T &max)
Definition: number.impl.hpp:65
T sign(const T &value)
Definition: number.impl.hpp:34
std::enable_if_t< std::is_integral< T >::value, bool > enable_if_is_integral
Definition: number.hpp:33
-T smooth(T value, T target, T ratio)
Definition: number.impl.hpp:98
+T smooth(T value, T target, T ratio)
Definition: number.impl.hpp:103
T scale(const T &value, const T &source, const T &target)
Definition: number.impl.hpp:46
T map(const T &value, const T &source_min, const T &source_max, const T &target_min, const T &target_max)
Definition: number.impl.hpp:52
std::enable_if_t< std::is_floating_point< T >::value, bool > enable_if_is_floating_point
Definition: number.hpp:36
-T wrap(const T &value, const T &min, const T &max)
Definition: number.impl.hpp:80
+T wrap(const T &value, const T &min, const T &max)
Definition: number.impl.hpp:85
diff --git a/number_8impl_8hpp_source.html b/number_8impl_8hpp_source.html
index d7d9cd3..d8886cc 100644
--- a/number_8impl_8hpp_source.html
+++ b/number_8impl_8hpp_source.html
@@ -126,65 +126,70 @@
53 const T & value,
const T & source_min,
const T & source_max,
54 const T & target_min,
const T & target_max)
- 56 return target_min +
scale(value - source_min, source_max - source_min, target_max - target_min);
-
-
-
- 60 T
clamp(
const T & value,
const T & min,
const T & max)
-
- 62 return std::min(std::max(value, min), max);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 79 template<
typename T, enable_if_is_
floating_po
int<T> = true>
- 80 T
wrap(
const T & value,
const T & min,
const T & max)
-
- 82 auto min_value = value - min;
- 83 auto min_max = max - min;
-
- 85 return min + std::fmod(min_max + std::fmod(min_value, min_max), min_max);
-
-
- 88 template<
typename T, enable_if_is_
integral<T> = true>
- 89 T
wrap(
const T & value,
const T & min,
const T & max)
-
- 91 auto min_value = value - min;
- 92 auto min_max = max - min;
-
- 94 return min + (min_max + min_value % min_max) % min_max;
-
-
-
-
-
- 100 return ((1.0 - ratio) * value) + (ratio * target);
-
-
-
-
-
+ 56 auto source_val = value;
+ 57 source_val = std::min(source_val, std::max(source_min, source_max));
+ 58 source_val = std::max(source_val, std::min(source_min, source_max));
+
+
+ 61 scale(source_val - source_min, source_max - source_min, target_max - target_min);
+
+
+
+ 65 T
clamp(
const T & value,
const T & min,
const T & max)
+
+ 67 return std::min(std::max(value, min), max);
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 84 template<
typename T, enable_if_is_
floating_po
int<T> = true>
+ 85 T
wrap(
const T & value,
const T & min,
const T & max)
+
+ 87 auto min_value = value - min;
+ 88 auto min_max = max - min;
+
+ 90 return min + std::fmod(min_max + std::fmod(min_value, min_max), min_max);
+
+
+ 93 template<
typename T, enable_if_is_
integral<T> = true>
+ 94 T
wrap(
const T & value,
const T & min,
const T & max)
+
+ 96 auto min_value = value - min;
+ 97 auto min_max = max - min;
+
+ 99 return min + (min_max + min_value % min_max) % min_max;
+
+
+
+
+
+ 105 return ((1.0 - ratio) * value) + (ratio * target);
+
+
+
+
+
-T clamp(const T &value, const T &min, const T &max)
Definition: number.impl.hpp:60
+T clamp(const T &value, const T &min, const T &max)
Definition: number.impl.hpp:65
T sign(const T &value)
Definition: number.impl.hpp:34
-T smooth(T value, T target, T ratio)
Definition: number.impl.hpp:98
+T smooth(T value, T target, T ratio)
Definition: number.impl.hpp:103
T scale(const T &value, const T &source, const T &target)
Definition: number.impl.hpp:46
T map(const T &value, const T &source_min, const T &source_max, const T &target_min, const T &target_max)
Definition: number.impl.hpp:52
-T wrap(const T &value, const T &min, const T &max)
Definition: number.impl.hpp:80
+T wrap(const T &value, const T &min, const T &max)
Definition: number.impl.hpp:85