chore: add build artifacts, map assets, and routing data
This commit is contained in:
@@ -4,6 +4,12 @@ enum AngleUnit {
|
||||
dual, // Both: 045° (0800 ₥)
|
||||
}
|
||||
|
||||
extension AngleUnitExtension on AngleUnit {
|
||||
String formatHeading(double deg, {bool includeLabel = false}) {
|
||||
return AngleFormatter.format(deg, this, includeLabel: includeLabel);
|
||||
}
|
||||
}
|
||||
|
||||
class AngleFormatter {
|
||||
static const double degToMilsNato = 17.7777777778; // 6400 mils / 360 deg
|
||||
|
||||
@@ -23,11 +29,11 @@ class AngleFormatter {
|
||||
|
||||
switch (unit) {
|
||||
case AngleUnit.degrees:
|
||||
return includeLabel ? 'السمت: $degStr' : degStr;
|
||||
return includeLabel ? 'الاتجاه: $degStr' : degStr;
|
||||
case AngleUnit.mils:
|
||||
return includeLabel ? 'السمت: $milsStr' : milsStr;
|
||||
return includeLabel ? 'الاتجاه: $milsStr' : milsStr;
|
||||
case AngleUnit.dual:
|
||||
return includeLabel ? '$degStr ($milsStr)' : '$degStr ($milsStr)';
|
||||
return includeLabel ? 'الاتجاه: $degStr ($milsStr)' : '$degStr ($milsStr)';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user