Files
OpenNest/Posts/OpenNest.Posts.Cincinnati/CoordinateFormatter.cs
T
aj c825f40213 refactor(posts): move post-processor projects under Posts/
Group the Cincinnati and GravographIS plugin projects in a Posts/
folder so new machine posts have one home. Project names, namespaces,
and the runtime Posts/ deploy target are unchanged; only relative
paths in the solution and project references move.
2026-09-26 22:35:23 -04:00

26 lines
707 B
C#

namespace OpenNest.Posts.Cincinnati
{
public sealed class CoordinateFormatter
{
private readonly int _accuracy;
private readonly string _format;
public CoordinateFormatter(int accuracy)
{
_accuracy = accuracy;
_format = "0." + new string('#', accuracy);
}
public string FormatCoord(double value)
{
return System
.Math.Round(value, _accuracy)
.ToString(_format, System.Globalization.CultureInfo.InvariantCulture);
}
public static string Comment(string text) => $"( {text} )";
public static string InlineComment(string text) => $"({text})";
}
}