Special case when slope of required line becomes infinity
if ( 1 - Math . Tan ( x ) * given_slope == 0 ) { Console . WriteLine ( " x ▁ = ▁ " + ( Math . Round ( x1 * 100.0 ) / 100.0 ) ) ; } if ( 1 + Math . Tan ( x ) * given_slope == 0 ) { Console . WriteLine ( " x ▁ = ▁ " + ( Math . Round ( x1 * 100.0 ) / 100.0 ) ) ; }