Advertisement

absolute values and double

Started by December 11, 2002 02:56 PM
1 comment, last by samosa 22 years, 2 months ago
i have a simple collision detection method that i made to decided if two circles are intersecting. to find the distance between them im using the c++ abs() function, all was well and good until i decided that integers were not accurate enough for my purposes, i declared all my variables to double and my compiler tells me that all the decimal places in the doubles are lost when i make the values absolute, is there any way for me to get the absolute value of a double and keep the decmial? thanks for any help ,Matt -= kill one your a murderer, kill thousands your a conquerer =-
-= kill one you're a murderer, kill thousands you're a conquerer =-
Use the floating point absolute function fabs.

Kippesoep
Advertisement
thanks

,Matt

-= kill one your a murderer, kill thousands your a conquerer =-
-= kill one you're a murderer, kill thousands you're a conquerer =-

This topic is closed to new replies.

Advertisement