mirror of
https://github.com/aap/librw.git
synced 2025-12-23 02:49:55 +00:00
fix 'warning: implicit conversion from ‘rw::float32’ {aka ‘float’} to ‘double’ to match other operand of binary expression [-Wdouble-promotion]'
This commit is contained in:
@@ -502,8 +502,8 @@ Camera::setFOV(float32 hfov, float32 ratio)
|
||||
|
||||
float ar1 = 4.0/3.0;
|
||||
float ar2 = w/h;
|
||||
float vfov = atan(tan(hfov/2) / ar1) *2;
|
||||
hfov = atan(tan(vfov/2) * ar2) *2;
|
||||
float vfov = atanf(tanf(hfov/2) / ar1) *2;
|
||||
hfov = atanf(tanf(vfov/2) * ar2) *2;
|
||||
|
||||
float32 a = tan(hfov);
|
||||
v.set(a, a/ratio);
|
||||
|
||||
Reference in New Issue
Block a user