Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

if(a == null || a == Double.NaN) {
a = 0
}
if(b == null || b == Double.NaN) {
b = 0
}
if(c == null || c == Double.NaN ) {
c = 0
}
return a/(a + b + c)

 

You can observe result on the visualisations below.

...