コード例 #1
0
ファイル: Vec4.cs プロジェクト: boggard/3dEngineWPF
        public float Length()
        {
            if (Vector.IsHardwareAccelerated)
            {
                float ls = Vec4.Dot(this, this);
                return((float)System.Math.Sqrt(ls));
            }
            else
            {
                float ls = X * X + Y * Y + Z * Z + W * W;

                return((float)Math.Sqrt((double)ls));
            }
        }