Skip to content

Commit 7bad004

Browse files
committed
fix GLES compatibility
1 parent 862d293 commit 7bad004

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/core/RefractionExtinction.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -292,9 +292,9 @@ float REFRACTION_sin(float x)
292292
// Workaround for Intel's and AMD's unusable implementation of asin, which leads to time-dependent shifts of the Moon from its refracted positions.
293293
float REFRACTION_asin(float x)
294294
{
295-
float sign = x < 0 ? -1 : 1;
296-
if(x < 0) x = -x;
297-
x = 2 * sqrt(1 - x) - 1;
295+
float sign = x < 0. ? -1. : 1.;
296+
if(x < 0.) x = -x;
297+
x = 2. * sqrt(1. - x) - 1.;
298298
float v = 0.848061881596496 + x*(-0.755929497461161 + x*(-0.0539853235799928 + x*(-0.025701166121295 + x*(-0.00723634508887381 +
299299
x*(-0.00314276748524976 + x*(-0.00101365621070969 + x*(-0.000411380592372285 + x*(-0.000428167561924693 - 0.000213293541786718*x))))))));
300300
return v * sign;

0 commit comments

Comments
 (0)