Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public double tempcalc(double voltage)
- {
- double temp;
- double cprv = 0.033;
- double zero = 1.65;
- int x = 50;
- if (voltage == 0)
- {
- temp = x * (-1);
- }
- else if(voltage == zero)
- {
- temp = 0;
- }
- else
- {
- temp = (voltage / cprv) - x;
- }
- return temp;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement