摘要: 效果 //点是否在射线上 public static bool IsPointOnRay(Vector2 o, Vector2 dir, Vector2 p) { var op = p - o; if (Mathf.Approximately(op.sqrMagnitude, 0)) //o和p重叠 阅读全文
posted @ 2023-11-23 23:19 yanghui01 阅读(13) 评论(0) 推荐(0) 编辑
摘要: //求两直线交点 - 直线方程组方式 public static bool IsTwoLineIntersect(Vector2 A, Vector2 B, Vector2 C, Vector2 D, out Vector2 point) { point = Vector2.zero; /** 1 阅读全文
posted @ 2023-11-23 22:51 yanghui01 阅读(24) 评论(0) 推荐(0) 编辑