AcademySoftwareFoundation / OpenShadingLanguage

Advanced shading language for production GI renderers
BSD 3-Clause "New" or "Revised" License
2.05k stars 347 forks source link

docs: Clarify behavior of round() #1767

Closed lgritz closed 4 months ago

lgritz commented 5 months ago

Pointed out in MaterialX discussions, our spec was not clear what round() should do in cases where the input value is exactly half way between two integers. Our design (and implementation) uses "round away from zero" policy for that case, matching C/C++ standard round(). But we were not clear about it in the docs.