I never knew there was a problem with using % with floats. However, I just got this error:I'd like to constrain the float variable to values between 0 and 2PI (radian measurements, and I'd prefer not to lose precision as the value continues to increase) Is there a way to do it without using while loops - a modulus for floats? I could code it easily enough like that, but it seems ugly and slow.Code:error C2296: '%' : illegal, left operand has type 'float'
Thanks.



LinkBack URL
About LinkBacks


