General case
double slope_1 = ( given_slope + Math . tan ( x ) ) / ( 1 - Math . tan ( x ) * given_slope ) ; double slope_2 = ( given_slope - Math . tan ( x ) ) / ( 1 + Math . tan ( x ) * given_slope ) ;