Skip to content

Instantly share code, notes, and snippets.

@tatuas
Created April 10, 2018 02:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tatuas/0b330ac24632255e11292cac915d1c10 to your computer and use it in GitHub Desktop.
Save tatuas/0b330ac24632255e11292cac915d1c10 to your computer and use it in GitHub Desktop.
kotlinで最大値と最小値を設定
FLOAT.coerceAtMost(2.0f) // 最大値は2.0
FLOAT.coerceAtLeast(1.0f) // 最小値は1.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment