src/Utils.cpp

changeset 218
725da10db56c
parent 215
4e2de71142a4
child 219
fa7cad488e27
equal deleted inserted replaced
217:6c2cd26095a5 218:725da10db56c
239 } 239 }
240 240
241 241
242 double Utils::calc_svg(double og, double fg) 242 double Utils::calc_svg(double og, double fg)
243 { 243 {
244 if (og == 0.0 || fg == 0.0)
245 return 0;
246
244 double oe = sg_to_plato(og); 247 double oe = sg_to_plato(og);
245 double ae = sg_to_plato(fg); 248 double ae = sg_to_plato(fg);
246 249
247 return (oe - ae) / oe * 100; 250 return (oe - ae) / oe * 100;
248 } 251 }

mercurial