Skip to content

Comments

Use culture independent ToString for converting doubles to string#3

Open
vvoland wants to merge 1 commit intoAwokeKnowing:masterfrom
vvoland:master
Open

Use culture independent ToString for converting doubles to string#3
vvoland wants to merge 1 commit intoAwokeKnowing:masterfrom
vvoland:master

Conversation

@vvoland
Copy link

@vvoland vvoland commented May 24, 2017

Fix issue #2

if (i > 0 && x[i] != x[i - 1])
stream.WriteLine("");
stream.WriteLine(x[i] + " " + y[i] + " " + z[i]);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

string.Format accepts CultureInfo, no need to call ToString for every parameter
string.Format(CultureInfo.InvariantCulture, "{0} {1} {2}", x[i], y[i], z[i]);

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's nifty! Didn't like that line at all but didn't think about any other way to do it. Thanks! Fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants