Euphoria
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
libs
base
src
base
range.cc
Go to the documentation of this file.
1
#include "
base/range.h
"
2
3
namespace
eu
4
{
5
float
6
from_01f
(
float
lower_bound,
float
upper_bound,
float
value)
7
{
8
return
value * (upper_bound - lower_bound) + lower_bound;
9
}
10
11
template
<>
12
float
13
from_01
(
const
Range<float>
& range,
float
value)
14
{
15
return
from_01f
16
(
17
range.
lower_bound
,
18
range.
upper_bound
,
19
value
20
);
21
}
22
}
23
eu
Definition:
assert.h:90
eu::from_01f
float from_01f(float lower_bound, float upper_bound, float value)
Definition:
range.cc:6
eu::from_01
float from_01(const Range< float > &range, float value)
Definition:
range.cc:13
range.h
eu::Range< float >
eu::Range::upper_bound
T upper_bound
Definition:
range.h:18
eu::Range::lower_bound
T lower_bound
Definition:
range.h:17