Quote: "When the rand function is used giving it a range, like rand() % 10 for example, as far as I know the value will never be the maximum range you provided, so in this case it will never be 10."
Quote: "it will return ten."
No, it won't. I hate it when people say stuff without even testing it first
The '%' sign is the MODULUS operator. It returns the remainder when you divide two numbers. The remainder of x/10 can never be 10.
Quote: "cos and sin functions accept double floats, while dbCos and dbSin use single floats"
cos and sin (and the other functions in math.h) are overloaded to accept 'long double', 'double' and 'float' parameters.
Quote: "i have just done a test with the cos and sin out of the math.h and converted the radians to degrees like mireben said and still get a completley different value"
Are you sure? Could you show us the code you are using which shows that?