Module: Geometry. Product of vectors


Problem

1 /5


Area of ​​a triangle

Theory Click to read/hide

Let there be two vectors: \(a(x_1,y_1)\) and \( b(x_2,y_2 )\) . The area of ​​a parallelogram, "stretched" on these vectors — is the module of the skew product \(x_1 \cdot y_2-x_2 \cdot y_1\) vectors, and the area of ​​the "stretched" triangle is half that area. 
Note that the described method for finding the area is better than Heron's formula, since it does not use root extraction, which leads to loss of calculation accuracy.

Problem

Input
Six numbers – coordinates of the three vertices of the triangle.
 
Output
Single number – the area of ​​the triangle.
 
Examples
# Input Output
1 1 1 2 4 3 2 2.50000