public float AngleTo(JarvisElement other, Vector2 dir) { Vector2 v = Direction(other); float dot = Vector2.Dot(v, dir); return(Mathf.Acos(dot)); }
public float DistanceTo(JarvisElement other) { Vector2 v = mPoint - other.mPoint; return(v.magnitude); }
public Vector2 Direction(JarvisElement other) { Vector2 v = mPoint - other.mPoint; return(v.normalized); }