I pose a problem, ladies and gentlemen. I need to do work with vectors on a Vex microcontroller, but the problem is, it doesn't support double or float variables, so using the math.h trig functions is out. Specifically, I need tangent and arctangent (tan and atan). Any way of writing custom functions for these using integers?
Basically, I'm trying to derive the angle and magnitude of the position of a control joystick with the x and y axes. Each axis has an unsigned character range (0-255), and 127 is center. I need to combine the positions of both axes and get the angle of the joystick (such as on a standard coordinate plane) and the distance of the joystick from the center (Pythagorean theorem, not worried about that part).