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. Session Bean = client data is maintained upto pred
View Tutorial By: Chetankumar at 2012-05-19 11:12:17
2. I have a site fully based on php and mysql.The log
View Tutorial By: titus at 2011-06-14 00:52:30
3. sorry i think that's a constructor...just had one
View Tutorial By: Gautam at 2013-10-14 15:55:14
4. i want to study java
View Tutorial By: doshyo at 2007-12-13 07:41:03
5. Very nice.
Thanks
View Tutorial By: Kaviya at 2015-02-23 13:48:15
6. good one
View Tutorial By: vij at 2009-06-03 16:00:12
7. To the,
sir/mam, i want to do java certific
View Tutorial By: CERTIFICATION OF JAVA at 2011-03-03 02:27:05
8. enter no of line: 5 not fix value
out put i
View Tutorial By: mark at 2013-01-31 14:30:00
9. Good.understand
View Tutorial By: Selva at 2009-12-29 23:27:29
10. Thanks a lot...I've been trying to fix my apache f
View Tutorial By: Lázaro at 2010-01-20 03:32:07