public static XRectangleF Inflate(XRectangleF rect, XReal x, XReal y) { rect.X -= x; rect.Y -= y; rect.Width += x * 2; rect.Height += y * 2; return(rect); }
public static XVector2 Lerp(XVector2 v1, XVector2 v2, XReal lerp) { return(new XVector2(v1.X + (v2.X - v1.X) * lerp, v1.Y + (v2.Y - v1.Y) * lerp)); }
public XVector2(XReal x, XReal y) { X = x; Y = y; }
public static XReal Atan2(XReal y, XReal x) { return((XReal)(Math.Atan2(y.value, x.value))); }
public XRectangleF(XReal x, XReal y, XReal width, XReal height) { X = x; Y = y; Width = width; Height = height; }
public static XReal Acos(XReal v) { return((XReal)(Math.Acos(v.value))); }
public static XReal Atan(XReal v) { return((XReal)(Math.Atan(v.value))); }
public static XReal Sin(XReal v) { return((XReal)(Math.Sin(v.value))); }
public static XReal Pow(XReal v, XReal p) { return((XReal)(Math.Pow(v.value, p.value))); }
public static XReal Sqrt(XReal v) { return((XReal)(Math.Sqrt(v.value))); }
public void Normalize() { XReal scale = 1 / Length; X *= scale; Y *= scale; Z *= scale; }
public XVector3(XReal x, XReal y, XReal z) { X = x; Y = y; Z = z; }