Write a program to find if the given points form a trapezoid. Points are given in anti clock wise direction starting from bottom left point.
Input (Point, Point, Point, Point) |
Output (boolean) |
[5, 2], [9, 2], [9, 4], [7, 4] |
true |
[14, 3], [16, 3], [16, 5], [14, 7] |
true |
[6, -6], [8, -6], [8, -4], [6, -1] |
true |
[2, 1], [8, 1], [9, 8], [6, 6] |
false |
[7, 0], [8, 1], [7, 2], [6, 0] |
false |