# Snow tut: Why rad += (k/180)\*Math.PI?

**URL:** <https://forum.kirupa.com/t/snow-tut-why-rad-k-180-math-pi/166977>\
**Category:** Uncategorized\
**Created:** [October 24, 2005, 2:59pm UTC](https://forum.kirupa.com/t/snow-tut-why-rad-k-180-math-pi/166977 "2005-10-24T14:59:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Spirit\_Z3RO](https://avatars.discourse-cdn.com/v4/letter/s/fbc32d/32.png) [@Spirit\_Z3RO](https://forum.kirupa.com/u/Spirit_Z3RO)\
**Post date:** [October 24, 2005, 2:59pm UTC](https://forum.kirupa.com/t/snow-tut-why-rad-k-180-math-pi/166977/1 "2005-10-24T14:59:49Z")

</div>

Why rad += (k/180)\*Math.PI on the snow tut?

"  
onClipEvent (load) {  
//variables  
width = 300;  
height = 200;  
//random x,y, and alpha  
this.\_xscale = this.\_yscale=50+Math.random()_100;  
this.\_alpha = 20+Math.random()50;  
//random x and y for flakes  
this.\_x = -width+Math.random()(3_width);  
this.\_y = -10+Math.random()\*height;  
//speed and trigonometric value  
i = 1+Math.random()\*2;  
k = -Math.PI+Math.random()\*Math.PI;  
rad = 0;  
}  
onClipEvent (enterFrame) {  
// horizontal movement  
rad += (k/180)\*Math.PI;  
"

It took me forever to realize that k is PI^2 without the math.random(), but now I do not understand why k/180\*Math.PI again!  
Why 180?

PI^2/180 then why \* PI again?

Could someone tell me what each part’s roles are?
