rotate Y


    
    private function rotateY(ball:animation_ch18_Ball3D, angleY:Number):void
    {
     var position:Array = [ball.xpos, ball.ypos, ball.zpos];
     
     var sin:Number = Math.sin(angleY);
     var cos:Number = Math.cos(angleY);
     var yRotMatrix:Array = new Array();
     yRotMatrix[0] = [ cos, 0, sin];
     yRotMatrix[1] = [   0, 1,   0];
     yRotMatrix[2] = [-sin, 0, cos]
     
     var result:Array = matrixMultiply(position, yRotMatrix);
     ball.xpos = result[0];
     ball.ypos = result[1];
     ball.zpos = result[2];
    }