I'm generating a random integer (between 0 & 99), converting it into a string and successfully transferring it over bluetooth to a second machine, which then converts it back to an integer for further processing. However any subsequent calculations result in an answer of 0. I'm using: -
str_int = strtol(buf, NULL, 10);
But when I then try to: -
height = (str_int / 100);
The answer is always 0. What am I missing? I need to eventually scale this random number between -0.5 and 0.5 for OpenGL processing.