Added halveDistance