fahrenheitToCelsius method
Converts Fahrenheit to Celsius.
Formula: (°F − 32) × 5/9 = °C
Example:
print(77.fahrenheitToCelsius()); // 25.0
Implementation
double fahrenheitToCelsius() {
return (this - 32) * 5 / 9;
}
Converts Fahrenheit to Celsius.
Formula: (°F − 32) × 5/9 = °C
Example:
print(77.fahrenheitToCelsius()); // 25.0
double fahrenheitToCelsius() {
return (this - 32) * 5 / 9;
}