Skip to content
This repository has been archived by the owner on Nov 8, 2021. It is now read-only.

apply offset does not accept fractions... #134

Closed
gb2111 opened this issue Jul 9, 2018 · 5 comments
Closed

apply offset does not accept fractions... #134

gb2111 opened this issue Jul 9, 2018 · 5 comments

Comments

@gb2111
Copy link
Contributor

gb2111 commented Jul 9, 2018

hi,
i was trying to set height of headset
when I enter 1.8 (dot separator) it turns in to 0 on UI.
when I enter 1,1 or 1,9 (comma separator) it all is treated as 1.
:/

@polygraphene
Copy link
Owner

Did you check checkbox on the left of "Apply offset"?

@gb2111
Copy link
Contributor Author

gb2111 commented Jul 9, 2018

yes.
if I put dot. it changes into 0
if I put comma. whatever is after comma, it is rounded to integer.

@gb2111
Copy link
Contributor Author

gb2111 commented Jul 10, 2018

perhaps you use current pc settings while they should be provided explicitely?

@polygraphene
Copy link
Owner

current pc settings

What do you mean?
Locale or language settings changes behaviour of parsing float?

@polygraphene
Copy link
Owner

https://stackoverflow.com/questions/27722032/c-sharp-float-parse-string

float.Parse(string) method uses your current culture settings by default. Looks like your CurrentCulture's NumberDecimalSeparator property is , not .
...
float number = float.Parse("0.54", CultureInfo.InvariantCulture);

Oh... You are right.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants