Results 1 to 6 of 6
- 05-11-2012, 04:06 PM #1
Member
- Join Date
- May 2012
- Posts
- 2
- Rep Power
- 0
help convert something simple to java from vb
I'm a total newb and need help doing a conversion from vb to java. its a hydrometer calibration formula.
Java Code:Function sgRatio(Temp As Double) As Double sgRatio = 1.00130346 - 0.000134722124 * Temp + 0.00000204052596 * Temp ^ 2 - 2.32820948E-09 * Temp ^ 3 End Function Function corSG(SG As Double, Temp As Double, CalT As Double) As Double corSG = SG * (sgRatio(Temp) / sgRatio(CalT)) End Function
Layman instructions.
C = ((1.313454 - (0.132674*F) + (0.00205779 * F^2) - (0.000002627634 * F^2)))
Where F = Temperature in degrees Fahrenheit.
C = Correction
So,
CG = C + (SG * 0.001)
Where,
CG = Specific Gravity corrected for temperature
C = Correction from above forumla
SG = Specific Gravity before temperature correction.
Thanks in advance... this is not homework, just me messing around :)
- 05-11-2012, 04:17 PM #2
Re: help convert something simple to java from vb
All the help you'll need to make a start can be found in The Java™ Tutorials
And it doesn't make any difference whether it's homework or not, this is a forum -- not a code mill. We're prepared to help you learn, not to do your work for you.
dbIf you're forever cleaning cobwebs, it's time to get rid of the spiders.
- 05-11-2012, 05:14 PM #3
Member
- Join Date
- May 2012
- Posts
- 2
- Rep Power
- 0
Re: help convert something simple to java from vb
Just figured I could learn from an example. Thanks anyways Mr. catty :)
- 05-11-2012, 05:28 PM #4
Re: help convert something simple to java from vb
OOT: since when db becomes "catty"?
- 05-11-2012, 05:44 PM #5
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 14,421
- Blog Entries
- 7
- Rep Power
- 26
Re: help convert something simple to java from vb
Build a wall around Donald Trump; I'll pay for it.
- 05-11-2012, 07:43 PM #6
Re: help convert something simple to java from vb
The whole shebang is plagiarized
Temp Correction Formula for Hydrometer - Page 3 - Home Brew Forums
Temp Correction Formula for Hydrometer - Page 2 - Home Brew Forums
Guess the mouse is going to have to buckle down and do its own homework.
OT, it's time for me to change my signature.
dbIf you're forever cleaning cobwebs, it's time to get rid of the spiders.
Similar Threads
-
How Do I: Convert to Java
By mexists in forum New To JavaReplies: 3Last Post: 11-29-2011, 02:50 AM -
how to convert * into : using java
By Ricks in forum New To JavaReplies: 2Last Post: 02-02-2010, 04:57 PM -
Convert .java to .exe
By susan in forum New To JavaReplies: 6Last Post: 02-11-2009, 06:47 AM -
Convert java to .exe
By heartysnowy in forum New To JavaReplies: 13Last Post: 11-21-2008, 08:16 AM -
convert VB6 applications to Java
By bbq in forum New To JavaReplies: 1Last Post: 07-05-2007, 03:57 AM
Bookmarks