Sharygin 2012/8

Given three points A, B, and C in the plane, determine whether the angle at B is a right angle. The input is a flat array [ax, ay, bx, by, cx, cy]. Return 1 when the vectors BA and BC are perpendicular, and 0 otherwise.

Examples
Input: [6,0,0,0,0,8]
Output: 1
Hints

Sharygin 2012/8

Given three points `A`, `B`, and `C` in the plane, determine whether the angle at `B` is a right angle. The input is a flat array `[ax, ay, bx, by, cx, cy]`. Return `1` when the vectors `BA` and `BC` are perpendicular, and `0` otherwise.