MapLibre Native Core
Main Page
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
z
Functions
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
z
Variables
a
b
c
d
e
f
g
i
k
l
m
n
o
p
r
s
t
v
Typedefs
a
c
d
e
f
g
i
l
m
n
o
p
s
t
u
v
Enumerations
a
b
c
e
f
h
i
k
l
m
n
o
r
s
t
v
Enumerator
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
~
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
y
z
Typedefs
Enumerations
Enumerator
Related Functions
a
b
e
i
m
o
s
t
Files
File List
File Members
All
Macros
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
clamp.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <
mbgl/math/minmax.hpp
>
4
5
namespace
mbgl
{
6
namespace
util {
7
8
template
<
typename
T>
9
T
clamp
(T value, T min_, T max_) {
10
return
max
(min_,
min
(max_, value));
11
}
12
13
}
// namespace util
14
}
// namespace mbgl
minmax.hpp
mbgl::util::clamp
T clamp(T value, T min_, T max_)
Definition:
clamp.hpp:9
mbgl::util::max
std::enable_if_t< std::is_integral_v< T >, T > max(T a, T b)
Definition:
minmax.hpp:11
mbgl::util::min
std::enable_if_t< std::is_integral_v< T >, T > min(T a, T b)
Definition:
minmax.hpp:26
mbgl
Definition:
actor.hpp:15
include
mbgl
math
clamp.hpp
MapLibre website
|
GitHub repository