text: calculate displacements along axes
code: float dx = ( float ) ( ( l / Math . Sqrt ( 1 + ( m * m ) ) ) * 0.5 ) ; float dy = m * dx ; a . x = p . x - dx ; a . y = p . y - dy ; d . x = p . x + dx ; d . y = p . y + dy ; b . x = q . x - dx ; b . y = q . y - dy ; c . x = q . x + dx ; c . y = q . y + dy ; } Console . Write ( ( int ) a . x + " , ▁ " + ( int ) a . y + " ▁ STRNEWLINE " + ( int ) b . x + " , ▁ " + ( int ) b . y + " STRNEWLINE " + ( int ) c . x + " , ▁ " + ( int ) c . y + " ▁ STRNEWLINE " + ( int ) d . x + " , ▁ " + ( int ) d . y + " STRNEWLINE " ) ; }