c++ - Error while using modulus operator in qt on double -


i have following code in qt program :

        lambda = lambda % 360.0  + dphi ; 

and getting following error while compiling: /home/vijay13/downloads/app/app/skyobjects/ksmoon.cpp:389: error: invalid operands of types 'double' , 'double' binary 'operator%'

can please me modulus of given double in qt/c++ ?

this has nothing qt. fact of matter % operator can't applied double.

for more information, , possible solution, see: can't use modulus on doubles?


Comments

Popular posts from this blog

c++ - CryptStringToBinary API behavior -

java.util.scanner - How to read and add only numbers to array from a text file -

iphone - Three second countdown in cocos2d -