HandyControl icon indicating copy to clipboard operation
HandyControl copied to clipboard

NumberTextBox 精度问题

Open shenlinjie opened this issue 3 months ago • 0 comments

Describe the bug

NumberTextBox 控件,设置Increment=0.1d,DecimalPlaces=2, 点击增加箭头,逐个增加数值。无法显示2.30,显示的是2.29;

Steps to reproduce the bug

调试中发现: Math.Truncate(230d)/100 2.3 Math.Truncate(Math.Pow(10,2)*2.3)/Math.Pow(10,2) 2.29 Math.Truncate(230d)/100d 2.3

Expected behavior

No response

Screenshots

No response

NuGet package version

None

IDE

No response

Framework type

No response

Windows version

No response

Additional context

No response

shenlinjie avatar Mar 22 '24 08:03 shenlinjie