public final class Triangle extends Object
Modifier and Type | Method and Description |
---|---|
static double |
area(Point2d a,
Point2d b,
Point2d c)
Returns the area of a triangle.
|
static double |
maxHeight(Point2d a,
Point2d b,
Point2d c)
Returns the maximum height of the triangle, which is max(h_a, h_b, h_c).
|
static double |
minHeight(Point2d a,
Point2d b,
Point2d c)
Returns the minimum height of the triangle, which is min(h_a, h_b, h_c).
|
static double |
perimeter(Point2d a,
Point2d b,
Point2d c)
Returns the perimeter of a triangle.
|
public static double perimeter(Point2d a, Point2d b, Point2d c)
a
- Point A of the triangle.b
- Point B of the triangle.c
- Point C of the triangle.public static double area(Point2d a, Point2d b, Point2d c)
a
- Point A of the triangle.b
- Point B of the triangle.c
- Point C of the triangle.public static double minHeight(Point2d a, Point2d b, Point2d c)
a
- Point A of the triangle.b
- Point B of the triangle.c
- Point C of the triangle.Copyright © 2012 Thomas Hillebrandt. All Rights Reserved.