I don't want to use double if I don't have to because I want to save memory. Here is the code using double:
The output of magx looks like this :1000612
The (correct) output of yx looks like this: 154.1000612 (using double)
But when I use float, it looks like this: 154.10007
To clear up what the number needs to be:
-the y value before the decimal point
-the mag value immediately after the decimal point
-the x value after the mag