FloatHelpers.cs 425 B

123456789101112131415
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. namespace Imagine.WebAR
  5. {
  6. public static class FloatExtensions
  7. {
  8. //this is needed to properly convert floating point strings for some languages to JSON
  9. public static string ToStringInvariantCulture(this float f)
  10. {
  11. return f.ToString(System.Globalization.CultureInfo.InvariantCulture);
  12. }
  13. }
  14. }