Minimum distance from a point to the line segment using VectorsGiven the coordinates of two endpoints A(x1, y1), B(x2, y2) of the line segment and coordinates of a point E(x, y); the task is to find the minimum distance from the point to line segment formed with the given coordinates.Note that both the ends of a line can go to infinity i.e. a line has no ending
10 min read
Equation of a straight line passing through a point and making a given angle with a given lineGiven four integers a, b, c representing coefficients of a straight line with equation (ax + by + c = 0), the task is to find the equations of the two straight lines passing through a given point (x1, y1) and making an angle ? with the given straight line. Examples: Input: a = 2, b = 3, c = -7, x1 =
15+ min read