Coder Social home page Coder Social logo

Comments (2)

ComFreek avatar ComFreek commented on June 7, 2024

@SESch93 I think the current fix of this issue (acfc025) fails in some cases*, e.g. if the current culture (in .NET terminology) has thousands separators set to commas, then measuring something like 10^6m will lead to ....toString() == "1,000,000m", which will then in turn be transformed to 1.000.000m using the linked changeset. And the latter seems wrong to me.

I think the correct solution would be to

  1. undo the changeset,

  2. set the current culture in the Unity app (or in each thread) to en-US,

    // do this in some init code, I guess
    Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US"); // this should work
    
  3. and to use (point1-point2).magnitude.ToString("N2") for stringifying the distance.

The last point is in accordance with an offical example by Microsoft and respects the culture for that matter.

If I had a working set-up of this project on my PC, I'd do this myself, but unfortunately I don't at the moment 😄 Sorry for bothering!

*) I think given that UFrameIT will probably be run by other people (reviewer), these cases are actually not just highly improbable corner cases, but might very well appear.

from uframeit.

SESch93 avatar SESch93 commented on June 7, 2024

Your absolutely right. This was only a quickfix for the screenshots. Have done the fix when I had no internet-connection but wasn't right to close the issue :) Sorry :)

from uframeit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.