Data update
This commit is contained in:
parent
52a6ef48dd
commit
157b70a810
604 changed files with 14253 additions and 2100 deletions
|
|
@ -0,0 +1,14 @@
|
|||
double local fn MeanAngle( angles as CFArrayRef )
|
||||
long count = len(angles)
|
||||
double sinSum = 0.0, cosSum = 0.0
|
||||
for long i = 0 to count - 1
|
||||
sinSum += sin(dblval(angles[i]) * M_PI / 180.0)
|
||||
cosSum += cos(dblval(angles[i]) * M_PI / 180.0)
|
||||
next
|
||||
end fn = fn atan2(sinSum / count, cosSum / count) * 180.0 / M_PI
|
||||
|
||||
print @"Mean angle of [350,10] = ";fn MeanAngle( @[@350,@10] )
|
||||
print @"Mean angle of [90,180,270,360] = ";fn MeanAngle( @[@90,@180,@270,@360] )
|
||||
print @"Mean angle of [10,20,30] = ";fn MeanAngle( @[@10,@20,@30] )
|
||||
|
||||
HandleEvents
|
||||
Loading…
Add table
Add a link
Reference in a new issue