예제 #1
0
        public Layout(bool flat, PointF size, PointF origin)
        {
            if (flat)
            {
                this.Orientation = new Orientation(3.0f / 2.0f, 0.0f, Math.Sqrt(3.0f) / 2.0f, Math.Sqrt(3.0f), 2.0f / 3.0f, 0.0f, -1.0f / 3.0f, Math.Sqrt(3.0f) / 3.0f, 0.0f);
            }
            else
            {
                this.Orientation = new Orientation(Math.Sqrt(3.0f), Math.Sqrt(3.0f) / 2.0f, 0.0f, 3.0f / 2.0f, Math.Sqrt(3.0f) / 3.0f, -1.0f / 3.0f, 0.0f, 2.0f / 3.0f, 0.5f);
            }

            this.Size   = size;
            this.Origin = origin;
            this.Flat   = flat;
        }
예제 #2
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="x"></param>
 /// <returns></returns>
 public static Half Sqrt(Half x) =>
 (Half)M.Sqrt(x);