mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-01-22 16:56:19 +01:00
11 lines
272 B
Dart
11 lines
272 B
Dart
extension NumExtension on num {
|
|
bool inRange(
|
|
num beg,
|
|
num end, {
|
|
bool isBegInclusive = true,
|
|
bool isEndInclusive = true,
|
|
}) {
|
|
return (this > beg || (isBegInclusive && this == beg)) &&
|
|
(this < end || (isEndInclusive && this == end));
|
|
}
|
|
}
|