Skip to content

VecSetInf() Use INFINITY instead of UB

Jacob Faibussowitsch requested to merge jacobf/2022-03-28/fix-vecsetinf-ub into main

1/0 is undefined behavior in C/C++ and hence the compiler could -- if it were so inclined -- remove the

for (...) arr[i] = inf;

entirely. So use INFINITY instead.

Edited by Jacob Faibussowitsch

Merge request reports