inMargin static method

bool inMargin(
  1. double? value,
  2. double? start,
  3. double? margin
)

Dtermines if a value is between a marginal range from the value

Implementation

static bool inMargin(double? value, double? start, double? margin){
  assert(start != null);
  assert(margin != null);

  if(value == null){
    return false;
  }
  return Functions.isWithin(value, start! - margin!, start+ margin);
}