Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

what is 0.7f in setQuality(0.7f)??

Status
Not open for further replies.

eramgarden

Programmer
Joined
Aug 27, 2003
Messages
279
Location
US
I'm new to Java and have inherited a code...

I have this line of code:
encodeParam.setQuality(0.7f);

what is 0.7f? The image is blury and I think this line of code is causing it..
 
0.7f represents a float literal 0.7
0.7d represents a double literal 0.7

reference link:
In Java the float representation has a 23 bit significant and double has a 53 bit mantissa. This means that float gives 6 to 9 digits of decimal precision while double gives 15 to 17 digits of decimal precision.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top