Join Slack
Powered by
I'm not sure why Koltin has <https://kotlinlang.or...
# getting-started
e
Edgar Avuzi
02/10/2025, 7:10 AM
I'm not sure why Koltin has
https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.ranges/coerce-at-least.html
https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.ranges/coerce-at-most.html
if it also has
https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.math/min.html
https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.math/max.html
Edgar Avuzi
02/10/2025, 7:13 AM
Ah ok, seems like GPT gave correct answer
https://chatgpt.com/share/67a9a6ea-0c88-8001-abb6-1af1c71bac1b
e
ephemient
02/10/2025, 7:15 AM
it misses
https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.comparisons/min-of.html
and
https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.comparisons/max-of.html
which are also available for all Comparables (with overloads for primitive numeric types)
ephemient
02/10/2025, 7:16 AM
the signaled
intent
is different even if the result is the same, that's why there's different names.
https://discuss.kotlinlang.org/t/minof-and-maxof-versus-coerceatleast-and-coerceatmost/2258
👍 1
e
Edgar Avuzi
02/10/2025, 3:54 PM
Looks logical, perfect
Open in Slack
Previous
Next