Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I'm surprised you'd have to define pi in a fragment shader at all. Surely such a commonly used constant would be defined in the language/headers already?


You should always define Pi in your code, in case the value ever changes.


I've always though about that fact myself. Can somone find the answer to why didn't the GLSL designers / video card driver people make PI built into their language?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: