0
C question : Why here i need to put parentheses
floatâ âindexâ = â0.0588â * (â100â * (âfloatâ)y / (âfloatâ)x) - â0.296â * (â100â * (âfloatâ)z / (âfloatâ)x) - â15.8â; Why i need to put parentheses around float
2 Réponses
+ 2
y, x and z were converted to float. The use of parentheses are part of the conversion syntax.
https://www.tutorialspoint.com/cprogramming/c_type_casting.htm
+ 2
() called cast operator
https://www.ibm.com/docs/en/zos/2.1.0?topic=expressions-cast-operator