def _offset_direction_fix(self, x, y, width, height, slope): hitpoint = MathUtils.calc_y_at_distance(x, y, width, slope) bounces = MathUtils.calc_folds(hitpoint, height) return 1 if bounces % 2 == 0 else -1
def _hitpoint_r(self, x, y, width, height, slope): hitpoint = MathUtils.calc_y_at_distance(x, y, width, slope) return MathUtils.calc_folded_point(hitpoint, height)