def _slope_l(self, x, y, height, slope): hitpoint = MathUtils.calc_y_intercept(x, y, slope) bounces = MathUtils.calc_folds(hitpoint, height) return slope * (1 if bounces % 2 == 0 else -1 )
def _hitpoint_l(self, x, y, height, slope): hitpoint = MathUtils.calc_y_intercept(x, y, slope) return MathUtils.calc_folded_point(hitpoint, height)