User Tools

Site Tools


programming:quick_trigonometry_with_perl

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

programming:quick_trigonometry_with_perl [2018/09/25 15:00] (current)
Line 1: Line 1:
 +====== Quick trigonometry with perl ======
  
 +<​code>​
 +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}'
 +</​code>​
programming/quick_trigonometry_with_perl.txt ยท Last modified: 2018/09/25 15:00 (external edit)