Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (this.currentAangle < this.targetAngle)
- {
- if((this.currentAangle + this.rotatingAngle)> this.targetAngle)
- {
- this.currentAangle = this.targetAngle;
- }
- else
- {
- this.currentAangle += this.rotatingAngle;
- }
- }
- else
- {
- if ((this.currentAangle - this.rotatingAngle) < this.targetAngle)
- {
- this.currentAangle = this.targetAngle;
- }
- else
- {
- this.currentAangle -= this.rotatingAngle;
- }
- }
- if (Math.Sign(this.targetAngle) != Math.Sign(this.currentAangle) && Math.Abs(this.targetAngle)>2)
- {
- Signum = -1;
- }
- if (this.currentAangle < this.targetAngle * Signum)
- {
- if((this.currentAangle + this.rotatingAngle)> this.targetAngle)
- {
- this.currentAangle = this.targetAngle;
- }
- else
- {
- this.currentAangle += this.rotatingAngle;
- }
- }
- else
- {
- if ((this.currentAangle - this.rotatingAngle) < this.targetAngle)
- {
- this.currentAangle = this.targetAngle;
- }
- else
- {
- this.currentAangle -= this.rotatingAngle;
- }
- }
Add Comment
Please, Sign In to add comment