Original Post
Hi, I've implemented a class to deal with fixed point math. The class has some overloaded constructors which can receive float, int, etc and store the fixed point conversion in a var called value. The code follows: The problem is when I try to use it in my code. Whenever I want to assign it to a variable which is not from type Fixed32 I have to do this: GLfixed a = Fixed32(10).value; when I really wish to do is just: GLfixed a = Fixed32(10); Basically I can play with it around since all my variable in code are from Fixed32 type but when it comes to pass it down to OpenGL I'm force to use the ugly Fixed32(10).value since GLfixed is a typedef to int. Does anyone has any idea how can solve it? Thanks in advance.
class Fixed32
{
public:
// Constructors
// Overloaded operators
private:
int value;
};