Exemplo n.º 1
0
        public GodotPlane Normalized()
        {
            float num = normal.Length();

            if (num == 0.0)
            {
                return(new GodotPlane(0.0f, 0.0f, 0.0f, 0.0f));
            }
            return(new GodotPlane(normal / num, d / num));
        }
Exemplo n.º 2
0
        public GodotQuat(GodotVector3 axis, float angle)
        {
            float num1 = axis.Length();

            if (num1 == 0.0)
            {
                x = 0.0f;
                y = 0.0f;
                z = 0.0f;
                w = 0.0f;
            }
            else
            {
                float num2 = GodotMathf.Sin(angle * 0.5f) / num1;
                x = axis.x * num2;
                y = axis.y * num2;
                z = axis.z * num2;
                w = GodotMathf.Cos(angle * 0.5f);
            }
        }