Пример #1
0
        /// <summary>
        /// Returns a <see cref="System.String"/> that represents this instance.
        /// </summary>
        /// <param name="format">The format.</param>
        /// <param name="formatProvider">The format provider.</param>
        /// <returns>
        /// A <see cref="System.String"/> that represents this instance.
        /// </returns>
        public string ToString(string format, IFormatProvider formatProvider)
        {
            if (format == null)
            {
                return(ToString(formatProvider));
            }

            return(string.Format(formatProvider, "{0}°", MyMathf.RadiansToDegrees(radians).ToString(format, CultureInfo.CurrentCulture)));
        }
Пример #2
0
 /// <summary>
 /// Returns a <see cref="System.String"/> that represents this instance.
 /// </summary>
 /// <param name="formatProvider">The format provider.</param>
 /// <returns>
 /// A <see cref="System.String"/> that represents this instance.
 /// </returns>
 public string ToString(IFormatProvider formatProvider)
 {
     return(string.Format(formatProvider, MyMathf.RadiansToDegrees(radians).ToString("0.##°")));
 }
Пример #3
0
 /// <summary>
 /// Returns a <see cref="System.String"/> that represents this instance.
 /// </summary>
 /// <returns>
 /// A <see cref="System.String"/> that represents this instance.
 /// </returns>
 public override string ToString()
 {
     return(string.Format(CultureInfo.CurrentCulture, MyMathf.RadiansToDegrees(radians).ToString("0.##°")));
 }