Fix bug with calculating image size: use radians instead of degrees

This commit is contained in:
Ylva Selling
2021-05-19 14:34:32 +02:00
parent 19d24e90d7
commit 28db33f199
+1 -1
View File
@@ -332,7 +332,7 @@ namespace openspace::skybrowser::luascriptfunctions {
// \|
glm::dvec3 j2000 = skybrowser::galacticCartesianToJ2000Cartesian(position);
double adjacent = glm::length(j2000);
double opposite = 2 * adjacent * glm::tan(image.fov * 0.5);
double opposite = 2 * adjacent * glm::tan(glm::radians(image.fov * 0.5));
// Calculate rotation to make the plane face the solar system barycenter
glm::dvec3 normal = glm::normalize(-position);