forked from bartvdbraak/blender
code cleanup: double promotion warnings.
This commit is contained in:
parent
34ba69d576
commit
f334df5624
@ -518,7 +518,7 @@ bool BlenderSession::draw(int w, int h)
|
||||
start_resize_time = time_dt();
|
||||
tag_redraw();
|
||||
}
|
||||
else if(time_dt() - start_resize_time < 0.2f) {
|
||||
else if(time_dt() - start_resize_time < 0.2) {
|
||||
tag_redraw();
|
||||
}
|
||||
else {
|
||||
|
@ -470,9 +470,9 @@ __device_inline void bvh_cardinal_curve_intersect(KernelGlobals *kg, Intersectio
|
||||
float d0 = d - r_curr;
|
||||
float d1 = d + r_curr;
|
||||
if (d0 >= 0)
|
||||
coverage = (min(d1 / mw_extension, 1.0f) - min(d0 / mw_extension, 1.0f)) * 0.5;
|
||||
coverage = (min(d1 / mw_extension, 1.0f) - min(d0 / mw_extension, 1.0f)) * 0.5f;
|
||||
else // inside
|
||||
coverage = (min(d1 / mw_extension, 1.0f) + min(-d0 / mw_extension, 1.0f)) * 0.5;
|
||||
coverage = (min(d1 / mw_extension, 1.0f) + min(-d0 / mw_extension, 1.0f)) * 0.5f;
|
||||
}
|
||||
|
||||
if (p_curr.x * p_curr.x + p_curr.y * p_curr.y >= r_ext * r_ext || p_curr.z <= epsilon) {
|
||||
|
@ -1130,7 +1130,7 @@ __device float compatible_powf(float x, float y)
|
||||
{
|
||||
/* GPU pow doesn't accept negative x, do manual checks here */
|
||||
if(x < 0.0f) {
|
||||
if(fmod(-y, 2.0f) == 0.0f)
|
||||
if(fmodf(-y, 2.0f) == 0.0f)
|
||||
return powf(-x, y);
|
||||
else
|
||||
return -powf(-x, y);
|
||||
|
Loading…
Reference in New Issue
Block a user