Quantcast
Channel: MSP430 Technical Forums
Viewing all articles
Browse latest Browse all 2077

Request to expand abs() function documentation

$
0
0

Hello,

 

I recently was trying to calculate the absolute value of a variable of type double (value of less than 1)  and was using the abs() function.

 

The documentation at http://energia.nu/reference/abs/ does not state that the abs() function should be used for integers only. Eventually I was able to figure it out an solve the problem by importing the "Math.h" library and using the fabs() function. It still did take me some time and it was not immediately obvious. 

 

Can you please update the reference for the abs() function and mention that it is only for integers and make a mention of fabs() in Math.h

 

Thanks.


Viewing all articles
Browse latest Browse all 2077

Trending Articles