Quantcast
Channel: MPLAB XC32
Viewing all articles
Browse latest Browse all 1537

Wrong cos() result (Igor Kocman)

$
0
0
Hi, I have a very strange problem: long lineCos(float degree, long len) { volatile float c1,c2; c1 = degree*3.141/180.0; c2 = cos(c1); return (c2*len); } And the return value is wrong.For example when the degree=0 then c2=1.25 instead 1.0.A spend man..

Viewing all articles
Browse latest Browse all 1537

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>