History

use radians instead of degrees (almost) everywhere

Andrew Meadows committed 12 years ago

Commit aa8c2fc1 parent de8165c51 files · +302 −306Browse files

Showing the changes to interface/src/Stars.cpp (1 of 51 files). Show all

Unified · Split

interface/src/Stars.cpp+1−2
@@ -30,9 +30,8 @@ bool Stars::setResolution(unsigned k) { · 29 unmodified lines
3030 }
3131
3232 void Stars::render(float fovY, float aspect, float nearZ, float alpha) {
33−
3433 // determine length of screen diagonal from quadrant height and aspect ratio
35− float quadrantHeight = nearZ * tan(angleConvert<Degrees,Radians>(fovY) * 0.5f);
34+ float quadrantHeight = nearZ * tan(RADIANS_PER_DEGREE * fovY * 0.5f);
3635 float halfDiagonal = sqrt(quadrantHeight * quadrantHeight * (1.0f + aspect * aspect));
3736
3837 // determine fov angle in respect to the diagonal

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t