src/Kingdom.OrTools.Sat.Parameters.Core/Implementation/ParameterValueRenderingOptions.cs
/// <summary>
/// Renders <see cref="PositiveInfinity"/> or <see cref="NegativeInfinity"/>, to
/// <see cref="inf"/>, having positive signage implicit, whereas negative signage
/// is explicit. Also renders <see cref="NaN"/> to <see cref="nan"/>. Otherwise,
/// renders the <see cref="double"/> <paramref name="value"/> as a Round Trip value.
/// </summary>
/// <param name="value"></param>
/// <returns></returns>
Renders  or , to
, having positive signage implicit, whereas negative signage
is explicit. Also renders  to . Otherwise,
renders the   as a Round Trip value.
Renders or to having positive signage implicit whereas negative signage is explicit . Also renders to . Otherwise renders the as a Round Trip value .
internal static string RenderDoubleValue(double value)
        {
            string RenderNegativeInfinity()
                => IsNegativeInfinity(value)
                    ? $"{value}".Substring(0, 4).ToLower()
                    : null;
            string RenderPositiveInfinityOrNaN()
                => IsPositiveInfinity(value) || IsNaN(value)
                    ? $"{value}".Substring(0, 3).ToLower()
                    : null;
            string RenderRoundTrip() => $"{value:R}";
            return RenderNegativeInfinity() ?? RenderPositiveInfinityOrNaN() ?? RenderRoundTrip();
        }
internal static string RenderDoubleValue ( double value ) { string RenderNegativeInfinity ( ) => IsNegativeInfinity ( value ) ? $" { value } " . Substring ( 0 , 4 ) . ToLower ( ) : null ; string RenderPositiveInfinityOrNaN ( ) => IsPositiveInfinity ( value ) || IsNaN ( value ) ? $" { value } " . Substring ( 0 , 3 ) . ToLower ( ) : null ; string RenderRoundTrip ( ) => $" { value : } " ; return RenderNegativeInfinity ( ) ?? RenderPositiveInfinityOrNaN ( ) ?? RenderRoundTrip ( ) ; }
Renders  or , to
, having positive signage implicit, whereas negative signage
is explicit.
Renders or to having positive signage implicit whereas negative signage is explicit .
None
value
double
None