コード例 #1
0
 /// <summary>
 /// Print a nullable number to a string with the proper number of significant digits (not just
 /// number of digits after the decimal). In other words, `2345` printed to 3 significant digits
 /// will print as `2350`.
 /// </summary>
 /// <param name="value">The number to format.</param>
 /// <param name="numDigits">The number of significant digits to print.</param>
 /// <returns></returns>
 /// <exception cref="ArgumentOutOfRangeException">When numDigits is less than 1.</exception>
 public static string SigFig(this Vector2?value, int numDigits)
 {
     return(value?.SigFig(numDigits));
 }