fastLn static method

double fastLn(
  1. double v
)

Guarded ln: exact logarithm when finite and positive, 0.0 otherwise.

Implementation

static double fastLn(double v) => (v.isFinite && v > 0) ? math.log(v) : 0.0;