Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Jan Koniarik
emlabcpp
Commits
3e4fc5f0
Commit
3e4fc5f0
authored
Nov 25, 2021
by
Jan Koniarik
Browse files
template args order chagned for map_range
parent
73cc8f7f
Pipeline
#102999
passed with stage
in 14 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
include/emlabcpp/algorithm.h
View file @
3e4fc5f0
...
...
@@ -39,7 +39,7 @@ constexpr int sign( T&& val )
}
/// maps input value 'input' from input range to equivalent value in output range
template
<
arithmetic_base
U
,
arithmetic_base
T
>
template
<
arithmetic_base
T
,
arithmetic_base
U
>
[[
nodiscard
]]
constexpr
U
map_range
(
T
input
,
T
from_min
,
T
from_max
,
U
to_min
,
U
to_max
)
{
return
to_min
+
(
to_max
-
to_min
)
*
static_cast
<
U
>
(
input
-
from_min
)
/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment