// Token: 0x0600001B RID: 27 RVA: 0x000027C4 File Offset: 0x00000BC4 public static Vector2 NearestPointStrict(Vector2 lineStart, Vector2 lineEnd, Vector2 point) { Vector2 p = lineEnd - lineStart; Vector2 vector = Mathfx.Normalize(p); float value = Vector2.Dot(point - lineStart, vector) / Vector2.Dot(vector, vector); return(lineStart + Mathf.Clamp(value, 0f, p.magnitude) * vector); }
// Token: 0x06000026 RID: 38 RVA: 0x00002B80 File Offset: 0x00000F80 public static Vector2 NearestPointOnCircle(Vector2 p, Vector2 center, float w) { Vector2 vector = p - center; vector = Mathfx.Normalize(vector); vector *= w; return(center + vector); }