mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-01-23 17:26:18 +01:00
12 lines
272 B
Dart
12 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));
|
||
|
}
|
||
|
}
|