BCPoint constructor

BCPoint({
  1. required double bc,
  2. double? mach,
  3. Velocity? v,
})

Implementation

BCPoint({required this.bc, double? mach, this.v})
  : mach = _calculateMach(mach, v) {
  if (bc <= 0) throw ArgumentError('Ballistic coefficient must be positive');
  if (mach != null && v != null) {
    throw ArgumentError("Cannot specify both 'mach' and 'v'");
  }
  if (mach == null && v == null) {
    throw ArgumentError("One of 'mach' or 'v' must be specified");
  }
}