iTween.ApplyRotateToTargets C# (CSharp) Method

ApplyRotateToTargets() private method

private ApplyRotateToTargets ( ) : void
return void
    void ApplyRotateToTargets()
    {
        preUpdate=transform.eulerAngles;

        //calculate:
        vector3s[2].x = ease(vector3s[0].x,vector3s[1].x,percentage);
        vector3s[2].y = ease(vector3s[0].y,vector3s[1].y,percentage);
        vector3s[2].z = ease(vector3s[0].z,vector3s[1].z,percentage);

        //apply:
        if (isLocal) {
            transform.localRotation = Quaternion.Euler(vector3s[2]);
        }else{
            transform.rotation = Quaternion.Euler(vector3s[2]);
        };

        //dial in:
        if(percentage==1){
            if (isLocal) {
                transform.localRotation = Quaternion.Euler(vector3s[1]);
            }else{
                transform.rotation = Quaternion.Euler(vector3s[1]);
            };
        }

        //need physics?
        postUpdate=transform.eulerAngles;
        if(physics){
            transform.eulerAngles=preUpdate;
            rigidbody.MoveRotation(Quaternion.Euler(postUpdate));
        }
    }
iTween