Comment on Tutorial - float vs double data types in Java By Baski
Comment Added by : George
Comment Added at : 2015-01-31 06:25:18
Comment on Tutorial : float vs double data types in Java By Baski
Hi Robert,
The precision statement applies to numbers that have a large number of digits on either or both sides of the decimal point. The range of the opacity value is 0 to 1, which granted, could contain a value that exceed the floats ability to precisely hold it, but you would never be able to tell the difference and I would be quite surprised to find that value ever used in iterative calculations. By turning it into a percentage it may be easier to see why. The opacity can be set from 0% to 100%. So if you want to change it from 64% to 63% for example, the float would be .63 and doesn't need any more precision than that as your eye would have great difficulty seeing any discernible difference beyond that. Even if you got really picky and wanted to be able to set your opacity to 63.937364 percent and for another object set it to 63.937365 you would #1 - never ever be able to tell the difference and #2 - you will still not have come even close to exceeding that precision for which the float is capable of holding.
View Tutorial
- Data Science
- Android
- AJAX
- ASP.net
- C
- C++
- C#
- Cocoa
- Cloud Computing
- HTML5
- Java
- Javascript
- JSF
- JSP
- J2ME
- Java Beans
- EJB
- JDBC
- Linux
- Mac OS X
- iPhone
- MySQL
- Office 365
- Perl
- PHP
- Python
- Ruby
- VB.net
- Hibernate
- Struts
- SAP
- Trends
- Tech Reviews
- WebServices
- XML
- Certification
- Interview
categories
Subscribe to Tutorials
Related Tutorials
Program using concept of byte long short and int in java
Update contents of a file within a jar file
Tomcat and httpd configured in port 8080 and 80
Count number of vowels, consonants and digits in a String in Java
Student marks calculation program in Java
Calculate gross salary in Java
Calculate average sale of the week in Java
Vector in Java - Sample Program
MultiLevel Inheritance sample in Java
Archived Comments
1. It too good code
View Tutorial By: Srinivas at 2011-02-20 03:58:19
2. i want every important questions in .net 3.5 and j
View Tutorial By: pawan at 2011-07-28 06:17:25
3. In the block form of SMTP.start, is there a way to
View Tutorial By: Roshan at 2012-02-02 11:48:53
4. well example, but i have to send the received list
View Tutorial By: amit kumar at 2011-02-21 00:43:15
5. @pawan: Wow. Your comment is museum-quality art, a
View Tutorial By: Steve at 2013-02-21 20:30:47
6. It would be nice to add the line,
View Tutorial By: Anonymous at 2009-08-30 07:59:10
7. Hello MR, I was running sms package to send sms, a
View Tutorial By: Ronized at 2008-12-29 16:53:33
8. How do u edit the text ? this is always replacing
View Tutorial By: anurag at 2012-08-23 07:24:47
9. Dear sir i am complete my B.Tech in this year but
View Tutorial By: Sarvesh at 2012-04-17 15:16:46
10. Nice info. I must say about this post.
than
View Tutorial By: Ganesh Prasad at 2012-10-30 05:51:49