PPRuNe Forums - View Single Post - C Code Anyone?
Thread: C Code Anyone?
View Single Post
Old 22nd March 2008 | 02:06
  #13 (permalink)  
bnt
15 Anniversary
 
Joined: Feb 2007
Posts: 755
Likes: 26
From: Dublin, Ireland. (No, I just live here.)
I think you're after an "absolute value" function, called abs(int x) or fabs(double x), or something like that? You'd apply it to each value before summing them. I found this code example that shows how they're used.
bnt is offline  
Reply