Gorgon Game Engine
Common.h
Go to the documentation of this file.
1
#pragma once
2
3
4
namespace
Gorgon
{
namespace
Widgets {
5
7
8
template
<
class
T_>
9
float
FloatDivider(T_ left, T_ min, T_ max) {
10
if
(min == max)
return
0.f;
11
12
return
float(left - min) / float(max - min);
13
}
14
15
template
<
class
T_>
16
T_ FloatToValue(
float
value, T_ min, T_ max) {
17
return
T_((max - min) * value + min);
18
}
19
21
22
} }
Gorgon
Root namespace for Gorgon Game Engine.
Definition:
Any.h:19
Gorgon
Widgets
Common.h
Generated on Sun Nov 15 2020 14:36:04 for Gorgon Game Engine by
1.8.20