package com.sdsmdg.kd.trianglify.models;


import android.graphics.Point;

public class Triangle {
    public Point a;
    public Point b;
    public Point c;

    public Triangle (Point a, Point b, Point c) {
        this.a = a;
        this.b = b;
        this.c = c;
    }

    private float sign (Point p1, Point p2, Point p3) {
        return (p1.x - p3.x) * (p2.y - p3.y) - (p1.y - p3.y) * (p2.x - p3.x);
    }

    public boolean contains (Point p) {
        boolean pab, pbc, pca;

        pab = sign(p, a, b) < 0f;
        pbc = sign(p, b, c) < 0f;

        if (pab == pbc)
            return false;

        pca = sign(p, c, a) < 0f;

        return (pab == pca);
    }
}

@@ -286,18 +286,27 @@
 ate 
-float sign
+boolean isClockwise
  (Po
@@ -411,16 +411,21 @@
  - p3.x)
+ %3C 0f
 ;%0A    %7D%0A
@@ -477,212 +477,81 @@
     
-boolean pab, pbc, pca;%0A%0A        pab = sign(p, a, b) %3C 0f;%0A        pbc = sign(p, b, c) %3C 0f;%0A%0A        if (pab == pbc)%0A            return false;%0A%0A        pca = sign(p, c, a) %3C 0f;%0A%0A        return (pab == pc
+return isClockwise(p, a, b) == isClockwise(p, b, c) == isClockwise(p, c, 
 a);%0A

Rename method sign-> isClockwise, simplify contains method body.