Skip to content

Instantly share code, notes, and snippets.

Created Dec 28, 2020
What would you like to do?
/// <Summary>
/// 引数で指定された値がClampメソッドを通してどの値になるかを確認します。
/// </Summary>
void ClampTest(int value)
int min = 0;
int max = 10;
int clamped = Mathf.Clamp(value, min, max);
Debug.Log($"{value} を入力した結果、Clampを通した値は {clamped} でした。");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment