package dwarf.graphics;

import dwarf.util.math;
import static dwarf.util.math.sqr;
import dwarf.util.Vector2;

/**
 * @author sid_th3_sl0th
 */
public class EquilateralTriangle extends Shape {

    public EquilateralTriangle(double sideLength, Vector2 position, String state, Colour colour) {
        super(3, sideLength, position, state, colour);
    }

    @Override
    public double getArea() {
        return math.sqrt(3) / 4 * sqr(getLineLength());
    }
}

@@ -109,16 +109,376 @@
 2;%0A%0A/**%0A
+ * In geometry, an equilateral triangle is a triangle in which all three sides%0A * are equal. In traditional or Euclidean geometry, equilateral triangles are%0A * also equiangular; that is, all three internal angles are also congruent to%0A * each other and are each 60%C2%B0. They are regular polygons, and can therefore%0A * also be referred to as regular triangles.%0A *%0A
  * @auth

Update EquilateralTriangle.java