public static int pointLineSide(Vector2 linePoint1,Vector2 linePoint2,Vector2 point){
  return (int)Math.signum((linePoint2.x - linePoint1.x) * (point.y - linePoint1.y) - (linePoint2.y - linePoint1.y) * (point.x - linePoint1.x));
}

public static int pointLineSide ( Vector2 linePoint1 , Vector2 linePoint2 , Vector2 point ) { return ( int ) Math . signum ( ( linePoint2 . x - linePoint1 . x ) * ( point . y - linePoint1 . y ) - ( linePoint2 . y - linePoint1 . y ) * ( point . x - linePoint1 . x ) ) ; }
determines on which side of the given line the point is . returns - 1 if the point is on the left side of the line , 0 if the point is on the line and 1 if the point is on the right side of the line . left and right are relative to the lines direction which is linepoint1 to linepoint2 .
