Merge pull request #30 from InsanusMokrassar/0.4.11

0.4.11
This commit is contained in:
InsanusMokrassar 2020-12-07 22:44:29 +06:00 committed by GitHub
commit ccc4d030c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 2 deletions

View File

@ -1,5 +1,10 @@
# Changelog
## 0.4.11
* `Common`
* Add `clamp` function
## 0.4.10
* `Versions`:

View File

@ -0,0 +1,10 @@
package dev.inmo.micro_utils.common
@Suppress("NOTHING_TO_INLINE")
inline fun <T : Comparable<T>> T.clamp(min: T, max: T): T {
return when {
this < min -> min
this > max -> max
else -> this
}
}

View File

@ -40,5 +40,5 @@ dokka_version=1.4.20
# Project data
group=dev.inmo
version=0.4.10
android_code_version=14
version=0.4.11
android_code_version=15