All pastes #262144 Raw Edit

Direction Pseudocode

public c v1 · immutable
#262144 ·published 2006-11-30 05:28 UTC
rendered paste body
if (dir_change)	step_acc= (1/2 step, for whichever direction we're now headed in)...if (step_acc > addval) {	step_acc -= addval;	// keep track of our 1/2 "pseudo-step)	accum -= addval;	if (step should have happened)		set a flag} else {	step_acc=0  (was going to go to 0 anyway)	deal with accum as normal}...when doing the step, the check should beif (step_flag && !step_acc)  { step }