All pastes #360613 Raw Edit

Tobsan

public java v1 · immutable
·published 2007-02-17 16:31 UTC
rendered paste body
public synchronized void updateTurn()	{		if( turnDistance < 0)		{			while( turnDistance < 0)			{				if( Math.abs(turnDistance) < turnVelocity ) {					heading -= Math.toRadians(Math.abs(turnDistance));					turnDistance = 0;				}				else {				heading -= Math.toRadians(turnVelocity);				turnDistance += turnVelocity;				}				sleepForNow();			}		}		else		{			while( turnDistance > 0)			{				if( Math.abs(turnDistance) < turnVelocity ) {					heading += Math.toRadians(Math.abs(turnDistance));					turnDistance = 0;				}				else {				heading += Math.toRadians(turnVelocity);				turnDistance -= turnVelocity;				}				sleepForNow();			}		}	}