4Fermer6
ArtemisLe 20/08/2023 à 09:42
if you want to get the final "float" result, don't divide by 256.0 it's too slow, shift right by 8, the idea is to keep integer number at all times (except for the init maybe)
int float_result = fixed_result >> 8; // you loose the floating point, but you have the closest integer value of your result