1
1

Cleanup: Add float format

This commit is contained in:
2021-04-28 17:10:51 +02:00
parent f8f7c0ca6d
commit 4273ec04be
2 changed files with 6 additions and 6 deletions

View File

@@ -91,7 +91,7 @@ static float give_opacity_fading_factor(OpacityGpencilModifierData *mmd,
float *pos,
bool apply_obmat)
{
float factor_depth = 1;
float factor_depth = 1.0f;
if (((mmd->flag & GP_OPACITY_FADING) == 0) || ((mmd->object) == NULL)) {
return factor_depth;
@@ -107,13 +107,13 @@ static float give_opacity_fading_factor(OpacityGpencilModifierData *mmd,
/* Better with ratiof() function from line art. */
if (dist > fading_max) {
factor_depth = 0;
factor_depth = 0.0f;
}
else if (dist <= fading_max && dist > fading_min) {
factor_depth = (fading_max - dist) / (fading_max - fading_min);
}
else {
factor_depth = 1;
factor_depth = 1.0f;
}
return factor_depth;

View File

@@ -131,7 +131,7 @@ static void deformStroke(GpencilModifierData *md,
float curvef = 1.0f;
float factor_depth = 1;
float factor_depth = 1.0f;
if (mmd->flag & GP_THICK_FADING) {
if (mmd->object) {
@@ -143,13 +143,13 @@ static void deformStroke(GpencilModifierData *md,
/* Better with ratiof() function from line art. */
if (dist > fading_max) {
factor_depth = 0;
factor_depth = 0.0f;
}
else if (dist <= fading_max && dist > fading_min) {
factor_depth = (fading_max - dist) / (fading_max - fading_min);
}
else {
factor_depth = 1;
factor_depth = 1.0f;
}
}
}