public Serializable2DByteArray ToBytes()
        {
            var ret = new Serializable2DByteArray(Width, Height);

            for (var u = 0; u < Width; ++u)
            {
                for (var v = 0; v < Height; ++v)
                {
                    var val = this[u, v];
                    ret[u, v] = (byte)(Mathf.Clamp01(val) * 255);
                }
            }
            return(ret);
        }
        public Serializable2DByteArray Select(int x, int z, int width, int height)
        {
            if (x + width > Width || z + height > Height)
            {
                throw new IndexOutOfRangeException();
            }
            var result = new Serializable2DByteArray(width, height);

            for (var u = x; u < x + width; ++u)
            {
                for (var v = z; v < z + height; ++v)
                {
                    result[u - x, v - z] = this[u, v];
                }
            }
            return(result);
        }