Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,26 @@
#!/usr/bin/a68g --script #
# -*- coding: utf-8 -*- #
PROC mean angle = ([]#LONG# REAL angles)#LONG# REAL:
(
INT size = UPB angles - LWB angles + 1;
#LONG# REAL y part := 0, x part := 0;
FOR i FROM LWB angles TO UPB angles DO
x part +:= #long# cos (angles[i] * #long# pi / 180);
y part +:= #long# sin (angles[i] * #long# pi / 180)
OD;
#long# arc tan2 (y part / size, x part / size) * 180 / #long# pi
);
main:
(
[]#LONG# REAL angle set 1 = ( 350, 10 );
[]#LONG# REAL angle set 2 = ( 90, 180, 270, 360);
[]#LONG# REAL angle set 3 = ( 10, 20, 30);
FORMAT summary fmt=$"Mean angle for "g" set :"-zd.ddddd" degrees"l$;
printf ((summary fmt,"1st", mean angle (angle set 1)));
printf ((summary fmt,"2nd", mean angle (angle set 2)));
printf ((summary fmt,"3rd", mean angle (angle set 3)))
)