Wrong float values via `findCustomMessageOption`See original GitHub issue
I ran into a float decoding issue with the output of
findCustomMessageOption() when generating code for float validation rules as defined here:
1.23 in that
float.const option is turned into
1.2300000190734863 once it reaches my protoplugin code generator here.
Is that a known issue or am I doing sth. wrong or is there a bug with that? I can dig deeper myself if nothing comes to mind right away but I thought I’d ask first …
- Created a year ago
- Comments:6 (6 by maintainers)
Top GitHub Comments
I guess it boils down to this …
const view = new DataView(new ArrayBuffer(16)); view.setFloat32(0, 1.23, true); view.getFloat32(0, true); // 1.2300000190734863
Which, I guess, is expected.