api.dart.dev/stable/2.10.5/dart-math/max.html
max function - dart:math library - Dart API
max function Null safety T max (T a, T b ) Returns the larger of two numbers. Returns NaN if either argument is NaN. The larger of -0.0 and 0.0 is 0.0. If the arguments are otherwise equal (including int and doubles with the same mathematical value) then i
api.dart.dev
api.dart.dev/stable/2.12.1/dart-math/min.html
min function - dart:math library - Dart API
T min (T a, T b ) Returns the lesser of two numbers. Returns NaN if either argument is NaN. The lesser of -0.0 and 0.0 is -0.0. If the arguments are otherwise equal (including int and doubles with the same mathematical value) then it is unspecified which o
api.dart.dev
print(min(0, 5)); // 둘 중 작은 값 리턴
print(max(0, 5)); // 둘 중 큰 값 리턴
'Dart' 카테고리의 다른 글
Constructor - 이름 있는 생성자 (Named constructor) (0) | 2021.03.26 |
---|---|
Constructor - 기본 생성자 (0) | 2021.03.26 |
Class 용어정리 (0) | 2021.03.26 |
Lists (0) | 2021.03.25 |
Double형 소수점 이하자리 끊기! (0) | 2021.03.24 |