yes that is correct. If they would just write
w = 1.0 / w;
division by zero might occur. So adding the ternary operator here is an OK way to handle this. A more intuitive alternative would be:
if (w != 0.0f){
w = 1.0f / w;
}
2
solved What does this notation mean in C++? [duplicate]