Sunday, May 19, 2019

Re: GWT-client math vs. java-math

My testing has revealed that Math.sqrt does not yield the same results.

I think GWT just converts Math.sqrt to the JavaScript Math.sqrt function.  I noticed the JavaScript Math.sqrt function returns different results based on what browser, and what operating system you are using.

I couldn't think of a smart way to fix this to return the same result all the time, so I ended up just rounding the answer to 6 decimal places.

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit/6ba3d382-416a-4127-897a-5973968a90f8%40googlegroups.com.

No comments:

Post a Comment