MCPcopy Create free account
hub / github.com/MeshInspector/MeshLib / normalize

Function normalize

source/MRViewer/MRSpaceMouseHandler3dxMacDriver.cpp:131–141  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

129size_t gNumMsg{ 0 };
130
131float normalize( int16_t value )
132{
133 constexpr auto cAxisRange = 350.f;
134 constexpr auto cThreshold = 0.01f;
135
136 auto result = (float)value / cAxisRange;
137 if ( std::abs( result ) < cThreshold )
138 result = 0.f;
139
140 return result;
141}
142
143void updateDevicePrefs( uint32_t deviceId, ConnexionDevicePrefs& prefs )
144{

Callers 1

onSpaceMouseMessageFunction · 0.70

Calls 1

absFunction · 0.85

Tested by

no test coverage detected