/// <summary> /// Returns the string representation of this object</summary> /// <param name="format">Optional standard numeric format string for a floating point number. /// If null, "R" is used for round-trip support in case the string is persisted. /// http://msdn.microsoft.com/en-us/library/vstudio/dwhawy9k(v=vs.100).aspx </param> /// <param name="formatProvider">Optional culture-specific formatting provider. This is usually /// a CultureInfo object or NumberFormatInfo object. If null, the current culture is used. /// Use CultureInfo.InvariantCulture for persistence.</param> /// <returns>String that represents matrix</returns> public string ToString(string format, IFormatProvider formatProvider) { string listSeparator = StringUtil.GetNumberListSeparator(formatProvider); // For historic reasons, use "R" for round-trip support, in case this string is persisted. if (format == null) { format = "R"; } return(String.Format( "{0}{16} {1}{16} {2}{16} {3}{16} {4}{16} {5}{16} {6}{16} {7}{16} {8}{16} {9}{16} " + "{10}{16} {11}{16} {12}{16} {13}{16} {14}{16} {15}", M11.ToString(format, formatProvider), M12.ToString(format, formatProvider), M13.ToString(format, formatProvider), M14.ToString(format, formatProvider), M21.ToString(format, formatProvider), M22.ToString(format, formatProvider), M23.ToString(format, formatProvider), M24.ToString(format, formatProvider), M31.ToString(format, formatProvider), M32.ToString(format, formatProvider), M33.ToString(format, formatProvider), M34.ToString(format, formatProvider), M41.ToString(format, formatProvider), M42.ToString(format, formatProvider), M43.ToString(format, formatProvider), M44.ToString(format, formatProvider), listSeparator)); }
public void dump(string name = "") { DOut.pl(nameof(UMatrix4) + " " + name + " {"); DOut.Indent++; DOut.pl(M11.ToString() + ", " + M12.ToString() + ", " + M13.ToString() + ", " + M14.ToString()); DOut.pl(M21.ToString() + ", " + M22.ToString() + ", " + M23.ToString() + ", " + M24.ToString()); DOut.pl(M31.ToString() + ", " + M32.ToString() + ", " + M33.ToString() + ", " + M34.ToString()); DOut.pl(M41.ToString() + ", " + M42.ToString() + ", " + M43.ToString() + ", " + M44.ToString()); DOut.Indent--; DOut.pl("}"); }