KhronosGroup / KhronosGroup/OpenGL-Refpages

OpenGL Reference pages conflict with specifications for `atan` undefined behavior

Open
#152 0 comments 2 reactions 0 assignees View on GitHub
Dominant language
HTML
Stars
492
Forks
146
PR merge metrics
No merged PRs in 30d

Description

The Reference pages for `atan` indicate that "the result is undefined if x=0".

https://registry.khronos.org/OpenGL-Refpages/gl4/html/atan.xhtml

However, the GLSL specification does not match, and for atan it states "results are undefined if x and y are both 0."

https://registry.khronos.org/OpenGL/specs/gl/GLSLangSpec.4.60.pdf

(The Reference page phrasing is also somewhat vague because it has a paragraph specifically about "the second overload"—the one containing an x parameter—but the text about undefined results is not contained in this paragraph.)

FWIW, the SPIR-V definition of Atan2 matches the GLSL specification's text (undefined when x and y are both 0), not the Reference pages text (x=0).

Contributor guide

No contributing guide indexed for this repository

Research direction

Compare the `atan` Reference page with the GLSL 4.60 specification and the repository's source for that page. Update the undefined-behavior wording to distinguish the overloads and match the specification, then verify the generated HTML reflects the correction.

Written by the indexing model from the issue text.

Assessment

Tech stack
html
Domain
computer-graphics, documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.