r/programming • • Dec 20 '10

A Christmas Tree in 1k of Javascript

http://www.romancortes.com/blog/how-i-did-the-1kb-christmas-tree/
1.1k Upvotes

221 comments sorted by

View all comments

13

u/abeliangrape Dec 20 '10

Can some explain to me how using cos(angle+11) for sin(angle) saves space?

4

u/Douglas77 Dec 21 '10

11 = 3.5 * PI

(with an error of 0.0044, that's 1/4 degree)

EDIT: Misunderstood your question.