package ru.job4j.condition;

//import java.lang.*;

/**
 * Triangle.
 *
 * @author sartemov
 * @since 04.05.2017
 * @version 1
 */
public class Triangle {
	/**
	 * a.
	 */
	private Point a;
	/**
	 * b.
	 */
	private Point b;
	/**
	 * c.
	 */
	private Point c;
	/**
	 * Triangle.
	 * @param a **a**
	 * @param b **b**
	 * @param c **c**
	 */
	public Triangle(Point a, Point b, Point c) {
		this.a = a;
		this.b = b;
		this.c = c;
	}
	/**
	 * area.
	 * @return **area**
	 */
	public double area() {
		double p;
		double ab;
		double bc;
		double ac;
		ab = distan(this.a, this.b);
		bc = distan(this.b, this.c);
		ac = distan(this.a, this.c);
		p = (ab + bc + ac) / 2D;
		return (Math.sqrt(p * (p - ab) * (p - bc) * (p - ac)));
	}
	/**
	 * distan.
	 * @param a **a**
	 * @param b **b**
	 * @return  **расстояние между точками**
	 */
	 private double distan(Point a, Point b) {
		return Math.sqrt((a.getX() - b.getX()) * (a.getX() - b.getX()) + (a.getY() - b.getY()) * (a.getY() - b.getY()));
	}
}
@@ -503,52 +503,8 @@
 ble 
-p;%0A%09%09double ab;%0A%09%09double bc;%0A%09%09double ac;%0A%09%09
 ab =
@@ -530,16 +530,23 @@
 s.b);%0A%09%09
+double 
 bc = dis
@@ -568,16 +568,23 @@
 s.c);%0A%09%09
+double 
 ac = dis
@@ -606,16 +606,23 @@
 s.c);%0A%09%09
+double 
 p = (ab 
@@ -868,80 +868,52 @@
 qrt(
-(a.getX() - b.getX()) * (a.getX() - b.getX()) + (a.getY() - b.getY()) * 
+Math.pow(a.getX() - b.getX(), 2)  + Math.pow
 (a.g
@@ -928,16 +928,19 @@
 b.getY()
+, 2
 ));%0A%09%7D%0A%7D

task 190