mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-22 18:39:18 +02:00
virtual slider mouse input mode, minor refactoring, minor bug fixes
This commit is contained in:
@@ -228,6 +228,13 @@ clamp_circular( Type_ Value, Type_ const Range = static_cast<Type_>(360) ) {
|
||||
return Value;
|
||||
}
|
||||
|
||||
template <typename Type_>
|
||||
Type_
|
||||
quantize( Type_ const Value, Type_ const Step ) {
|
||||
|
||||
return ( Step * std::round( Value / Step ) );
|
||||
}
|
||||
|
||||
template <typename Type_>
|
||||
Type_
|
||||
min_speed( Type_ const Left, Type_ const Right ) {
|
||||
|
||||
Reference in New Issue
Block a user