Handbook
Glossary
rotate-point ( pt angle -- pt' )
Vocabulary
boids
Inputs
pt
an
object
angle
an
object
Outputs
pt'
an
object
Definition
USING:
arrays
math
math.functions
sequences
;
IN:
boids
::
rotate-point
( pt angle -- pt' )
pt
first
:>
x pt
second
:>
y angle
cos
:>
c angle
sin
:>
s x
c
*
y s
*
-
x s
*
y c
*
+
2array
;