Download
Magazine
Develop
Account
Download
Magazine
Develop
Login
Forgot Account/Password
Create Account
Language
Help
Language
Help
×
Login
Login Name
Password
×
Forgot Account/Password
Category:
Software
People
PersonalForge
Magazine
Wiki
Search
OSDN
>
Find Software
>
Multimedia
>
Graphics
>
Samurai Graph
>
Ticket List/Search
>
Ticket #5090
Samurai Graph
Description
Project Summary
Developer Dashboard
Web Page
Developers
Image Gallery
List of RSS Feeds
Activity
Statistics
History
Downloads
List of Releases
Stats
Source Code
Code Repository list
CVS
View Repository
Ticket
Ticket List
Milestone List
Type List
Component List
List of frequently used tickets/RSS
Submit New Ticket
Documents
Communication
List of Forums
Help (6)
Open Discussion (122)
News
Ticket #5090
Ticket List
Submit New Ticket
RSS
目盛り数字
Open Date:
2004-10-19 12:45
Last Update:
2004-11-09 14:57
monitor
ON
OFF
Reporter:
kuromaru
Owner:
kuromaru
Type:
Bugs
Status:
Closed
Component:
(None)
MileStone:
(None)
Priority:
5 - Medium
Severity:
5 - Medium
Resolution:
None
File:
None
Details
Reply
目盛り数字の表示がおかしくなる場合がある。
(例)
Min:0.0 Max:1.0
Auto:OFF
Step:0.15 Base:0.1
Ticket History (1/1 Histories)
2004-11-09 14:57
Updated by:
kuromaru
Ticket Close date
is changed to
2004-11-09 14:57
Status
Update from
Open
to
Closed
Comment
Reply
Logged In: YES
user_id=9078
BigDecimal クラスを用いて小数点の位置を変える操作を行なうとき、
引数で double の値を渡すコンストラクタで値を設定すると、うまく
変更できない場合がある。
具体的には、例えば
BigDecimal bd = new BigDecimal(0.70);
bd = bd.movePointLeft(1);
double value = bd.doubleValue();
の処理によって得られる値 value は 0.07 にはならず、
0.06999999999999999 という値になる。
正しい値を得るには、引数として文字列 "0.70" を渡す
コンストラクタを呼び出して、
BigDecimal bd = new BigDecimal(0.70);
bd = bd.movePointLeft(1);
double value = bd.doubleValue();
とする。これで得られる値 value は正しく 0.07 となる。
以上の変更を目盛りの数字を計算するメソッドに行なうことで、
正しい目盛り数字が得られるようにした。
Attachment File List (
0
)
Attachment File List
No attachments
Edit
Add Comment
You are not logged in.
I you are not logged in, your comment will be treated as an anonymous post. »
Login
Add Comment
Preview
Submit
(例)
Min:0.0 Max:1.0
Auto:OFF
Step:0.15 Base:0.1