-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
35d4b16
commit 58dd26a
Showing
4 changed files
with
31 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/* | ||
* Copyright (c) 2023. Aleksandr.ru | ||
* @link http://aleksandr.ru | ||
* | ||
* If you're using this code, please keep above information. | ||
*/ | ||
|
||
package ru.aleksandr.dccppthrottle | ||
|
||
object Utility { | ||
// https://stackoverflow.com/a/929107 | ||
fun remap(value: Float, oldMin: Float, oldMax: Float, newMin: Float, newMax: Float) : Float { | ||
val oldRange = (oldMax - oldMin) | ||
val newRange = (newMax - newMin) | ||
return (((value - oldMin) * newRange) / oldRange) + newMin | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
#Sun May 07 13:41:47 MSK 2023 | ||
VERSION_CODE=891 | ||
#Sun May 07 14:32:08 MSK 2023 | ||
VERSION_CODE=894 |