少年修仙传客户端代码仓库
client_linchunjie
2018-08-27 d106f11e7f44c748f595da36e0cdfd54849649e6
Utility/MathUtility.cs
@@ -154,6 +154,21 @@
        return (target - self).normalized;
    }
    public static bool IsSameDir(Vector3 vec1, Vector3 vec2)
    {
        vec1.y = 0;
        vec2.y = 0;
        return Vector3.Dot(vec1, vec2) > 0;
    }
    public static bool OppositeDir(Vector3 vec1, Vector3 vec2)
    {
        vec1.y = 0;
        vec2.y = 0;
        return Vector3.Dot(vec1, vec2) < 0;
    }
    public static int Power(int a, int e)
    {
        int value = 1;