MCPcopy Create free account
hub / github.com/diasurgical/devilution / clip

Function clip

SourceX/controls/touch.cpp:13–21  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11
12template <typename T>
13inline T clip(T v, T amin, T amax)
14{
15 if (v < amin)
16 return amin;
17 else if (v > amax)
18 return amax;
19 else
20 return v;
21}
22
23#define TOUCH_PORT_MAX_NUM 1
24#define NO_TOUCH -1 // finger id setting if finger is not touching the screen

Callers 1

preprocess_finger_motionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected