User Tools

Site Tools


programming:quick_trigonometry_with_perl

Quick trigonometry with perl

perl -MMath::Trig -e '$r=400; for ($n=-8; $n>-12;$n--) { $x=$r*cos(pi/2-$n*pi/12); $y=$r*sin(pi/2-$n*pi/12); printf "%d \t%d\n", $x, -$y}'
programming/quick_trigonometry_with_perl.txt · Last modified: 2018/09/25 13:00 (external edit)