operator / method

double? operator /(
  1. num? other
)

Performs division by a nullable num value.

If both are Null, Null is returned.

If only one of them is Null, a non-null value is returned.

Nullableなnum値での除算を行います。

両方がNullの場合はNullが返されます。

どちらかのみがNullの場合、Nullでない値が返されます。

Implementation

double? operator /(num? other) {
  if (this == null) {
    return other?.toDouble();
  }
  if (other == null) {
    return this?.toDouble();
  }
  return this! / other;
}