Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
dom
2026-05-31 18:03:13 +08:00
parent fef508ced6
commit 8713af4290
7 changed files with 80 additions and 47 deletions

View File

@@ -1,14 +0,0 @@
import 'package:floating/floating.dart';
extension RationalExt on Rational {
/// Checks whether given [Rational] instance fits into Android requirements
/// or not.
///
/// Android docs specified boundaries as inclusive.
bool get fitsInAndroidRequirements {
final aspectRatio = numerator / denominator;
const min = 1 / 2.39;
const max = 2.39;
return (min <= aspectRatio) && (aspectRatio <= max);
}
}