Open paul-wilkinson opened 4 years ago
breath and ratio are of type int, so (60/breath)/(1+ratio) uses integer division, which leads to truncation for some values of breath and ratio.
breath
ratio
(60/breath)/(1+ratio)
This patch avoids the truncation in the expression above by casting breath and ratio to double.
breath
andratio
are of type int, so(60/breath)/(1+ratio)
uses integer division, which leads to truncation for some values ofbreath
andratio
.This patch avoids the truncation in the expression above by casting
breath
andratio
to double.