minor tweak to cube (outside) so it uses lua's math lib