Hot answers tagged


I used pow from math.h, like 440.0 * pow(2, semitones / 12.0);. semitones in this case would be the number of semitones relative to A4 (one octave being 12 semitones). It's important to have the 12.0 as floating point, since division of two integers is integer again, truncating the result (AKA rounding towards zero). The .0 at the 440 don't matter, as the ...


It's not a floating point problem, it's an integer problem. ;-) Look at this line: int l = 65 / 14 * 100; It contains all integers. Additionally, consider the precedence of operations - what gets done in what order. Since all the numbers are integers, this is going to do integer division. The precedence rules says that all this will be done left to ...


Hmmm..... So here's my question for you. WHICH fields are supposed to be updated in the headers when resizing to something other than 1? Hint: check50 is giving you a clue. If this answers your question, please click on the check mark to accept. Let's keep up on forum maintenance. ;-)

Only top voted, non community-wiki answers of a minimum length are eligible