Skip to content

Commit

Permalink
fix clamp function description
Browse files Browse the repository at this point in the history
  • Loading branch information
friendlyhj committed Mar 14, 2022
1 parent dbfa67d commit 82acd97
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions advanced/math-package.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ import mods.ctutils.utils.Math;
// 若 x 小于 min,则返回 min
// 若 x 大于 max,则返回 max
// 1214 与 19 之间,返回 12
print(Math.clamp(12, 14, 19));
// 1510 与 19 之间,返回 15
print(Math.clamp(15, 10, 19));

// 10 不在 12 与 19 之间,返回 12
print(Math.clamp(10, 12, 19));
Expand Down

0 comments on commit 82acd97

Please sign in to comment.