Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2020-11-06 03:25:27 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-11-06 04:32:54 +0300
commit7cb20d841da16d0bffb63154403267500e9941f5 (patch)
treeef6a5e0b4e1de2f055ad3c0b3d5bb073a237f182 /source/blender
parent4a78a2774bee655a54391cc8fafae2d20ead2bb0 (diff)
Cleanup: follow our code style for float literals
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/blenkernel/intern/boids.c2
-rw-r--r--source/blender/blenkernel/intern/colortools.c6
-rw-r--r--source/blender/blenkernel/intern/dynamicpaint.c6
-rw-r--r--source/blender/blenkernel/intern/effect.c4
-rw-r--r--source/blender/blenkernel/intern/fluid.c6
-rw-r--r--source/blender/blenkernel/intern/object_dupli.c2
-rw-r--r--source/blender/blenkernel/intern/particle.c53
-rw-r--r--source/blender/blenkernel/intern/particle_child.c56
-rw-r--r--source/blender/blenkernel/intern/particle_distribute.c18
-rw-r--r--source/blender/blenkernel/intern/particle_system.c178
-rw-r--r--source/blender/blenkernel/intern/pointcache.c2
-rw-r--r--source/blender/blenkernel/intern/softbody.c6
-rw-r--r--source/blender/blenlib/intern/math_base_inline.c2
-rw-r--r--source/blender/blenlib/intern/math_geom.c2
-rw-r--r--source/blender/blenlib/intern/math_interp.c6
-rw-r--r--source/blender/blenlib/intern/math_matrix.c2
-rw-r--r--source/blender/blenlib/intern/noise.c10
-rw-r--r--source/blender/blenlib/intern/voxel.c44
-rw-r--r--source/blender/blenloader/intern/readfile.c4
-rw-r--r--source/blender/blenloader/intern/versioning_250.c16
-rw-r--r--source/blender/draw/intern/draw_cache.c20
-rw-r--r--source/blender/editors/curve/editcurve_add.c8
-rw-r--r--source/blender/editors/curve/editfont.c2
-rw-r--r--source/blender/editors/interface/interface_handlers.c14
-rw-r--r--source/blender/editors/interface/interface_intern.h2
-rw-r--r--source/blender/editors/object/object_vgroup.c8
-rw-r--r--source/blender/editors/physics/particle_edit.c2
-rw-r--r--source/blender/editors/screen/screen_ops.c2
-rw-r--r--source/blender/editors/sculpt_paint/paint_stroke.c2
-rw-r--r--source/blender/editors/sculpt_paint/paint_vertex.c2
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_uv.c4
-rw-r--r--source/blender/editors/space_action/action_edit.c2
-rw-r--r--source/blender/editors/space_graph/graph_edit.c2
-rw-r--r--source/blender/editors/space_view3d/view3d_walk.c9
-rw-r--r--source/blender/freestyle/intern/blender_interface/BlenderFileLoader.cpp6
-rw-r--r--source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp4
-rw-r--r--source/blender/freestyle/intern/image/ImagePyramid.h2
-rw-r--r--source/blender/freestyle/intern/stroke/Chain.cpp4
-rw-r--r--source/blender/freestyle/intern/stroke/Operators.cpp2
-rw-r--r--source/blender/freestyle/intern/stroke/Stroke.cpp2
-rw-r--r--source/blender/gpu/intern/gpu_immediate_util.c12
-rw-r--r--source/blender/ikplugin/intern/itasc_plugin.cpp14
-rw-r--r--source/blender/imbuf/intern/radiance_hdr.c6
-rw-r--r--source/blender/io/alembic/exporter/abc_export_capi.cc2
-rw-r--r--source/blender/io/alembic/intern/alembic_capi.cc2
-rw-r--r--source/blender/io/alembic/tests/abc_matrix_test.cc70
-rw-r--r--source/blender/io/usd/intern/usd_capi.cc2
-rw-r--r--source/blender/io/usd/intern/usd_writer_light.cc2
-rw-r--r--source/blender/makesdna/DNA_camera_defaults.h2
-rw-r--r--source/blender/makesrna/intern/rna_camera.c6
-rw-r--r--source/blender/makesrna/intern/rna_constraint.c44
-rw-r--r--source/blender/makesrna/intern/rna_image.c2
-rw-r--r--source/blender/makesrna/intern/rna_linestyle.c4
-rw-r--r--source/blender/makesrna/intern/rna_nodetree.c8
-rw-r--r--source/blender/makesrna/intern/rna_particle.c4
-rw-r--r--source/blender/makesrna/intern/rna_pose.c10
-rw-r--r--source/blender/makesrna/intern/rna_scene.c2
-rw-r--r--source/blender/makesrna/intern/rna_space.c4
-rw-r--r--source/blender/makesrna/intern/rna_tracking.c2
-rw-r--r--source/blender/makesrna/intern/rna_userdef.c16
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_defocus.c6
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_directionalblur.c2
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_lensdist.c4
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_bsdf_hair_principled.c2
-rw-r--r--source/blender/python/mathutils/mathutils_noise.c10
-rw-r--r--source/blender/render/intern/source/imagetexture.c106
-rw-r--r--source/blender/render/intern/source/render_texture.c2
-rw-r--r--source/blender/sequencer/intern/modifier.c8
-rw-r--r--source/blender/windowmanager/intern/wm_jobs.c2
-rw-r--r--source/blender/windowmanager/intern/wm_operator_props.c4
-rw-r--r--source/blender/windowmanager/intern/wm_operators.c2
71 files changed, 445 insertions, 441 deletions
diff --git a/source/blender/blenkernel/intern/boids.c b/source/blender/blenkernel/intern/boids.c
index 78ce70a8448..96bf9fbe8d2 100644
--- a/source/blender/blenkernel/intern/boids.c
+++ b/source/blender/blenkernel/intern/boids.c
@@ -899,7 +899,7 @@ static Object *boid_find_ground(BoidBrainData *bbd,
for (coll = bbd->sim->colliders->first; coll; coll = coll->next) {
col.current = coll->ob;
col.md = coll->collmd;
- col.fac1 = col.fac2 = 0.f;
+ col.fac1 = col.fac2 = 0.0f;
if (col.md && col.md->bvhtree) {
BLI_bvhtree_ray_cast_ex(col.md->bvhtree,
diff --git a/source/blender/blenkernel/intern/colortools.c b/source/blender/blenkernel/intern/colortools.c
index 34e8e8bc6fb..8723cd13e35 100644
--- a/source/blender/blenkernel/intern/colortools.c
+++ b/source/blender/blenkernel/intern/colortools.c
@@ -1257,7 +1257,7 @@ void BKE_curvemapping_blend_read(BlendDataReader *reader, CurveMapping *cumap)
/* ***************** Histogram **************** */
-#define INV_255 (1.f / 255.f)
+#define INV_255 (1.0f / 255.0f)
BLI_INLINE int get_bin_float(float f)
{
@@ -1570,8 +1570,8 @@ void BKE_scopes_update(Scopes *scopes,
return;
}
- if (scopes->hist.ymax == 0.f) {
- scopes->hist.ymax = 1.f;
+ if (scopes->hist.ymax == 0.0f) {
+ scopes->hist.ymax = 1.0f;
}
/* hmmmm */
diff --git a/source/blender/blenkernel/intern/dynamicpaint.c b/source/blender/blenkernel/intern/dynamicpaint.c
index fef4b49de7e..c842ed3aa22 100644
--- a/source/blender/blenkernel/intern/dynamicpaint.c
+++ b/source/blender/blenkernel/intern/dynamicpaint.c
@@ -123,7 +123,7 @@ static int neighStraightY[8] = {0, 1, 0, -1, 1, 1, -1, -1};
/* paint effect default movement per frame in global units */
#define EFF_MOVEMENT_PER_FRAME 0.05f
/* initial wave time factor */
-#define WAVE_TIME_FAC (1.0f / 24.f)
+#define WAVE_TIME_FAC (1.0f / 24.0f)
#define CANVAS_REL_SIZE 5.0f
/* drying limits */
#define MIN_WETNESS 0.001f
@@ -762,7 +762,7 @@ static void surfaceGenerateGrid(struct DynamicPaintSurface *surface)
sub_v3_v3v3(dim, grid->grid_bounds.max, grid->grid_bounds.min);
copy_v3_v3(td, dim);
copy_v3_v3(bData->dim, dim);
- min_dim = max_fff(td[0], td[1], td[2]) / 1000.f;
+ min_dim = max_fff(td[0], td[1], td[2]) / 1000.0f;
/* deactivate zero axises */
for (i = 0; i < 3; i++) {
@@ -5116,7 +5116,7 @@ static void dynamic_paint_prepare_effect_cb(void *__restrict userdata,
madd_v3_v3fl(forc,
scene->physics_settings.gravity,
surface->effector_weights->global_gravity * surface->effector_weights->weight[0] /
- 10.f);
+ 10.0f);
}
/* add surface point velocity and acceleration if enabled */
diff --git a/source/blender/blenkernel/intern/effect.c b/source/blender/blenkernel/intern/effect.c
index f51683ea351..f9d3fff1cec 100644
--- a/source/blender/blenkernel/intern/effect.c
+++ b/source/blender/blenkernel/intern/effect.c
@@ -699,8 +699,8 @@ int get_effector_data(EffectorCache *eff,
copy_v3_v3(efd->loc, state.co);
/* rather than use the velocity use rotated x-axis (defaults to velocity) */
- efd->nor[0] = 1.f;
- efd->nor[1] = efd->nor[2] = 0.f;
+ efd->nor[0] = 1.0f;
+ efd->nor[1] = efd->nor[2] = 0.0f;
mul_qt_v3(state.rot, efd->nor);
if (real_velocity) {
diff --git a/source/blender/blenkernel/intern/fluid.c b/source/blender/blenkernel/intern/fluid.c
index af4b98e1c8d..f5bbccb2618 100644
--- a/source/blender/blenkernel/intern/fluid.c
+++ b/source/blender/blenkernel/intern/fluid.c
@@ -1993,7 +1993,7 @@ static void sample_mesh(FluidFlowSettings *ffs,
/* Convert xyz velocities flow settings from world to grid space. */
float convert_vel[3];
copy_v3_v3(convert_vel, ffs->vel_coord);
- float time_mult = 1.0 / (25.f * DT_DEFAULT);
+ float time_mult = 1.0 / (25.0f * DT_DEFAULT);
float size_mult = MAX3(base_res[0], base_res[1], base_res[2]) /
MAX3(global_size[0], global_size[1], global_size[2]);
mul_v3_v3fl(convert_vel, ffs->vel_coord, size_mult * time_mult);
@@ -3293,7 +3293,7 @@ static Mesh *create_liquid_geometry(FluidDomainSettings *fds, Mesh *orgmesh, Obj
/* If needed, vertex velocities will be read too. */
bool use_speedvectors = fds->flags & FLUID_DOMAIN_USE_SPEED_VECTORS;
FluidDomainVertexVelocity *velarray = NULL;
- float time_mult = 25.f * DT_DEFAULT;
+ float time_mult = 25.0f * DT_DEFAULT;
if (use_speedvectors) {
if (fds->mesh_velocities) {
@@ -4430,7 +4430,7 @@ float BKE_fluid_get_velocity_at(struct Object *ob, float position[3], float velo
if (fmd && (fmd->type & MOD_FLUID_TYPE_DOMAIN) && fmd->domain && fmd->domain->fluid) {
FluidDomainSettings *fds = fmd->domain;
- float time_mult = 25.f * DT_DEFAULT;
+ float time_mult = 25.0f * DT_DEFAULT;
float size_mult = MAX3(fds->global_size[0], fds->global_size[1], fds->global_size[2]) /
MAX3(fds->base_res[0], fds->base_res[1], fds->base_res[2]);
float vel_mag;
diff --git a/source/blender/blenkernel/intern/object_dupli.c b/source/blender/blenkernel/intern/object_dupli.c
index 39d6ee2700c..a1b01bce6c9 100644
--- a/source/blender/blenkernel/intern/object_dupli.c
+++ b/source/blender/blenkernel/intern/object_dupli.c
@@ -1392,7 +1392,7 @@ static void make_duplis_particle_system(const DupliContext *ctx, ParticleSystem
mat4_to_size(original_size, obmat);
size_to_mat4(size_mat, original_size);
- xvec[0] = -1.f;
+ xvec[0] = -1.0f;
xvec[1] = xvec[2] = 0;
vec_to_quat(q, xvec, ob->trackflag, ob->upflag);
quat_to_mat4(obmat, q);
diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c
index 91cb7f81da2..108a43981a5 100644
--- a/source/blender/blenkernel/intern/particle.c
+++ b/source/blender/blenkernel/intern/particle.c
@@ -1198,7 +1198,7 @@ static float interpolate_particle_value(
value += w[3] * v4;
}
- CLAMP(value, 0.f, 1.f);
+ CLAMP(value, 0.0f, 1.0f);
return value;
}
@@ -1427,7 +1427,7 @@ static void do_particle_interpolation(ParticleSystem *psys,
PTCacheEditPoint *point = pind->epoint;
ParticleKey keys[4];
int point_vel = (point && point->keys->vel);
- float real_t, dfra, keytime, invdt = 1.f;
+ float real_t, dfra, keytime, invdt = 1.0f;
/* billboards wont fill in all of these, so start cleared */
memset(keys, 0, sizeof(keys));
@@ -1597,7 +1597,7 @@ static void do_particle_interpolation(ParticleSystem *psys,
/* Convert velocity to time-step size. */
if (pind->keyed || pind->cache || point_vel) {
- invdt = dfra * 0.04f * (psys ? psys->part->timetweak : 1.f);
+ invdt = dfra * 0.04f * (psys ? psys->part->timetweak : 1.0f);
mul_v3_fl(keys[1].vel, invdt);
mul_v3_fl(keys[2].vel, invdt);
interp_qt_qtqt(result->rot, keys[1].rot, keys[2].rot, keytime);
@@ -1616,7 +1616,7 @@ static void do_particle_interpolation(ParticleSystem *psys,
/* the velocity needs to be converted back from cubic interpolation */
if (pind->keyed || pind->cache || point_vel) {
- mul_v3_fl(result->vel, 1.f / invdt);
+ mul_v3_fl(result->vel, 1.0f / invdt);
}
}
@@ -2481,7 +2481,7 @@ int do_guides(Depsgraph *depsgraph,
pd->kink_freq,
pd->kink_shape,
pd->kink_amp,
- 0.f,
+ 0.0f,
pd->kink,
pd->kink_axis,
0,
@@ -2831,12 +2831,12 @@ static void psys_thread_create_path(ParticleTask *task,
if (ctx->between) {
ParticleData *pa = psys->particles + cpa->pa[0];
int w, needupdate;
- float foffset, wsum = 0.f;
+ float foffset, wsum = 0.0f;
float co[3];
float p_min = part->parting_min;
float p_max = part->parting_max;
/* Virtual parents don't work nicely with parting. */
- float p_fac = part->parents > 0.f ? 0.f : part->parting_fac;
+ float p_fac = part->parents > 0.0f ? 0.0f : part->parting_fac;
if (ctx->editupdate) {
needupdate = 0;
@@ -2864,15 +2864,15 @@ static void psys_thread_create_path(ParticleTask *task,
}
else {
key[w] = pcache[0];
- weight[w] = 0.f;
+ weight[w] = 0.0f;
}
}
/* modify weights to create parting */
- if (p_fac > 0.f) {
+ if (p_fac > 0.0f) {
const ParticleCacheKey *key_0_last = pcache_key_segment_endpoint_safe(key[0]);
for (w = 0; w < 4; w++) {
- if (w && (weight[w] > 0.f)) {
+ if (w && (weight[w] > 0.0f)) {
const ParticleCacheKey *key_w_last = pcache_key_segment_endpoint_safe(key[w]);
float d;
if (part->flag & PART_CHILD_LONG_HAIR) {
@@ -2881,7 +2881,7 @@ static void psys_thread_create_path(ParticleTask *task,
float d1 = len_v3v3(key[0]->co, key[w]->co);
float d2 = len_v3v3(key_0_last->co, key_w_last->co);
- d = d1 > 0.f ? d2 / d1 - 1.f : 10000.f;
+ d = d1 > 0.0f ? d2 / d1 - 1.0f : 10000.0f;
}
else {
float v1[3], v2[3];
@@ -2897,13 +2897,13 @@ static void psys_thread_create_path(ParticleTask *task,
d = (d - p_min) / (p_max - p_min);
}
else {
- d = (d - p_min) <= 0.f ? 0.f : 1.f;
+ d = (d - p_min) <= 0.0f ? 0.0f : 1.0f;
}
- CLAMP(d, 0.f, 1.f);
+ CLAMP(d, 0.0f, 1.0f);
- if (d > 0.f) {
- weight[w] *= (1.f - d);
+ if (d > 0.0f) {
+ weight[w] *= (1.0f - d);
}
}
wsum += weight[w];
@@ -3340,7 +3340,7 @@ void psys_cache_paths(ParticleSimulationData *sim, float cfra, const bool use_re
LOOP_PARTICLES
{
if (!psys->totchild) {
- psys_get_texture(sim, pa, &ptex, PAMAP_LENGTH, 0.f);
+ psys_get_texture(sim, pa, &ptex, PAMAP_LENGTH, 0.0f);
pa_length = ptex.length * (1.0f - part->randlength * psys_frand(psys, psys->seed + p));
if (vg_length) {
pa_length *= psys_particle_value_from_verts(psmd->mesh_final, part->from, pa, vg_length);
@@ -4273,9 +4273,9 @@ static void get_cpa_texture(Mesh *mesh,
break;
case TEXCO_PARTICLE:
/* texture coordinates in range [-1, 1] */
- texvec[0] = 2.f * (cfra - par->time) / (par->dietime - par->time) - 1.f;
- texvec[1] = 0.f;
- texvec[2] = 0.f;
+ texvec[0] = 2.0f * (cfra - par->time) / (par->dietime - par->time) - 1.0f;
+ texvec[1] = 0.0f;
+ texvec[2] = 0.0f;
break;
}
@@ -4383,14 +4383,15 @@ void psys_get_texture(
break;
case TEXCO_PARTICLE:
/* texture coordinates in range [-1, 1] */
- texvec[0] = 2.f * (cfra - pa->time) / (pa->dietime - pa->time) - 1.f;
+ texvec[0] = 2.0f * (cfra - pa->time) / (pa->dietime - pa->time) - 1.0f;
if (sim->psys->totpart > 0) {
- texvec[1] = 2.f * (float)(pa - sim->psys->particles) / (float)sim->psys->totpart - 1.f;
+ texvec[1] = 2.0f * (float)(pa - sim->psys->particles) / (float)sim->psys->totpart -
+ 1.0f;
}
else {
texvec[1] = 0.0f;
}
- texvec[2] = 0.f;
+ texvec[2] = 0.0f;
break;
}
@@ -4935,8 +4936,8 @@ int psys_get_particle_state(ParticleSimulationData *sim, int p, ParticleKey *sta
else {
float dfra, frs_sec = sim->scene->r.frs_sec;
/* let's interpolate to try to be as accurate as possible */
- if (pa->state.time + 2.f >= state->time && pa->prev_state.time - 2.f <= state->time) {
- if (pa->prev_state.time >= pa->state.time || pa->prev_state.time < 0.f) {
+ if (pa->state.time + 2.0f >= state->time && pa->prev_state.time - 2.0f <= state->time) {
+ if (pa->prev_state.time >= pa->state.time || pa->prev_state.time < 0.0f) {
/* prev_state is wrong so let's not use it,
* this can happen at frames 1, 0 or particle birth. */
dfra = state->time - pa->state.time;
@@ -4963,13 +4964,13 @@ int psys_get_particle_state(ParticleSimulationData *sim, int p, ParticleKey *sta
psys_interpolate_particle(-1, keys, keytime, state, 1);
/* convert back to real velocity */
- mul_v3_fl(state->vel, 1.f / (dfra * timestep));
+ mul_v3_fl(state->vel, 1.0f / (dfra * timestep));
interp_v3_v3v3(state->ave, keys[1].ave, keys[2].ave, keytime);
interp_qt_qtqt(state->rot, keys[1].rot, keys[2].rot, keytime);
}
}
- else if (pa->state.time + 1.f >= state->time && pa->state.time - 1.f <= state->time) {
+ else if (pa->state.time + 1.0f >= state->time && pa->state.time - 1.0f <= state->time) {
/* linear interpolation using only pa->state */
dfra = state->time - pa->state.time;
diff --git a/source/blender/blenkernel/intern/particle_child.c b/source/blender/blenkernel/intern/particle_child.c
index 31332cd6d98..98a55c3de95 100644
--- a/source/blender/blenkernel/intern/particle_child.c
+++ b/source/blender/blenkernel/intern/particle_child.c
@@ -88,7 +88,7 @@ static void do_kink_spiral_deform(ParticleKey *state,
{
float result[3];
- CLAMP(time, 0.f, 1.f);
+ CLAMP(time, 0.0f, 1.0f);
copy_v3_v3(result, state->co);
@@ -426,21 +426,21 @@ void do_kink(ParticleKey *state,
float obmat[4][4],
int smooth_start)
{
- float kink[3] = {1.f, 0.f, 0.f}, par_vec[3], q1[4] = {1.f, 0.f, 0.f, 0.f};
- float t, dt = 1.f, result[3];
+ float kink[3] = {1.0f, 0.0f, 0.0f}, par_vec[3], q1[4] = {1.0f, 0.0f, 0.0f, 0.0f};
+ float t, dt = 1.0f, result[3];
if (ELEM(type, PART_KINK_NO, PART_KINK_SPIRAL)) {
return;
}
- CLAMP(time, 0.f, 1.f);
+ CLAMP(time, 0.0f, 1.0f);
if (shape != 0.0f && !ELEM(type, PART_KINK_BRAID)) {
if (shape < 0.0f) {
- time = (float)pow(time, 1.f + shape);
+ time = (float)pow(time, 1.0f + shape);
}
else {
- time = (float)pow(time, 1.f / (1.f - shape));
+ time = (float)pow(time, 1.0f / (1.0f - shape));
}
}
@@ -449,14 +449,14 @@ void do_kink(ParticleKey *state,
if (smooth_start) {
dt = fabsf(t);
/* smooth the beginning of kink */
- CLAMP(dt, 0.f, (float)M_PI);
- dt = sinf(dt / 2.f);
+ CLAMP(dt, 0.0f, (float)M_PI);
+ dt = sinf(dt / 2.0f);
}
if (!ELEM(type, PART_KINK_RADIAL)) {
float temp[3];
- kink[axis] = 1.f;
+ kink[axis] = 1.0f;
if (obmat) {
mul_mat3_m4_v3(obmat, kink);
@@ -487,7 +487,7 @@ void do_kink(ParticleKey *state,
break;
}
case PART_KINK_RADIAL: {
- if (flat > 0.f) {
+ if (flat > 0.0f) {
float proj[3];
/* flatten along strand */
project_v3_v3v3(proj, par_vec, par_vel);
@@ -500,7 +500,7 @@ void do_kink(ParticleKey *state,
case PART_KINK_WAVE: {
madd_v3_v3fl(result, kink, amplitude * sinf(t));
- if (flat > 0.f) {
+ if (flat > 0.0f) {
float proj[3];
/* flatten along wave */
project_v3_v3v3(proj, par_vec, kink);
@@ -513,8 +513,8 @@ void do_kink(ParticleKey *state,
break;
}
case PART_KINK_BRAID: {
- float y_vec[3] = {0.f, 1.f, 0.f};
- float z_vec[3] = {0.f, 0.f, 1.f};
+ float y_vec[3] = {0.0f, 1.0f, 0.0f};
+ float z_vec[3] = {0.0f, 0.0f, 1.0f};
float vec_one[3], state_co[3];
float inp_y, inp_z, length;
@@ -533,21 +533,21 @@ void do_kink(ParticleKey *state,
copy_v3_v3(state_co, y_vec);
mul_v3_fl(y_vec, amplitude * cosf(t));
- mul_v3_fl(z_vec, amplitude / 2.f * sinf(2.f * t));
+ mul_v3_fl(z_vec, amplitude / 2.0f * sinf(2.0f * t));
}
else if (inp_z > 0.0f) {
- mul_v3_v3fl(state_co, z_vec, sinf((float)M_PI / 3.f));
+ mul_v3_v3fl(state_co, z_vec, sinf((float)M_PI / 3.0f));
madd_v3_v3fl(state_co, y_vec, -0.5f);
- mul_v3_fl(y_vec, -amplitude * cosf(t + (float)M_PI / 3.f));
- mul_v3_fl(z_vec, amplitude / 2.f * cosf(2.f * t + (float)M_PI / 6.f));
+ mul_v3_fl(y_vec, -amplitude * cosf(t + (float)M_PI / 3.0f));
+ mul_v3_fl(z_vec, amplitude / 2.0f * cosf(2.0f * t + (float)M_PI / 6.0f));
}
else {
- mul_v3_v3fl(state_co, z_vec, -sinf((float)M_PI / 3.f));
+ mul_v3_v3fl(state_co, z_vec, -sinf((float)M_PI / 3.0f));
madd_v3_v3fl(state_co, y_vec, -0.5f);
- mul_v3_fl(y_vec, amplitude * -sinf(t + (float)M_PI / 6.f));
- mul_v3_fl(z_vec, amplitude / 2.f * -sinf(2.f * t + (float)M_PI / 3.f));
+ mul_v3_fl(y_vec, amplitude * -sinf(t + (float)M_PI / 6.0f));
+ mul_v3_fl(z_vec, amplitude / 2.0f * -sinf(2.0f * t + (float)M_PI / 3.0f));
}
mul_v3_fl(state_co, amplitude);
@@ -555,13 +555,13 @@ void do_kink(ParticleKey *state,
sub_v3_v3v3(par_vec, state->co, state_co);
length = normalize_v3(par_vec);
- mul_v3_fl(par_vec, MIN2(length, amplitude / 2.f));
+ mul_v3_fl(par_vec, MIN2(length, amplitude / 2.0f));
add_v3_v3v3(state_co, par_co, y_vec);
add_v3_v3(state_co, z_vec);
add_v3_v3(state_co, par_vec);
- shape = 2.f * (float)M_PI * (1.f + shape);
+ shape = 2.0f * (float)M_PI * (1.0f + shape);
if (t < shape) {
shape = t / shape;
@@ -576,7 +576,7 @@ void do_kink(ParticleKey *state,
}
/* blend the start of the kink */
- if (dt < 1.f) {
+ if (dt < 1.0f) {
interp_v3_v3v3(state->co, state->co, result, dt);
}
else {
@@ -881,8 +881,8 @@ void do_child_modifiers(const ParticleChildModifierContext *modifier_ctx,
part->clump_noise_size,
clumpcurve);
- if (kink_freq != 0.f) {
- kink_amp *= (1.f - kink_amp_clump * clump);
+ if (kink_freq != 0.0f) {
+ kink_amp *= (1.0f - kink_amp_clump * clump);
do_kink(state,
modifier_ctx->par_co,
@@ -904,17 +904,17 @@ void do_child_modifiers(const ParticleChildModifierContext *modifier_ctx,
do_rough_curve(modifier_ctx->orco, mat, t, rough1, part->rough1_size, roughcurve, state);
}
else {
- if (rough1 > 0.f) {
+ if (rough1 > 0.0f) {
do_rough(modifier_ctx->orco, mat, t, rough1, part->rough1_size, 0.0, state);
}
- if (rough2 > 0.f) {
+ if (rough2 > 0.0f) {
float vec[3];
psys_frand_vec(sim->psys, i + 27, vec);
do_rough(vec, mat, t, rough2, part->rough2_size, part->rough2_thres, state);
}
- if (rough_end > 0.f) {
+ if (rough_end > 0.0f) {
float vec[3];
psys_frand_vec(sim->psys, i + 27, vec);
do_rough_end(vec, mat, t, rough_end, part->rough_end_shape, state);
diff --git a/source/blender/blenkernel/intern/particle_distribute.c b/source/blender/blenkernel/intern/particle_distribute.c
index d5999196b60..194593be4ff 100644
--- a/source/blender/blenkernel/intern/particle_distribute.c
+++ b/source/blender/blenkernel/intern/particle_distribute.c
@@ -150,9 +150,9 @@ static void distribute_grid(Mesh *mesh, ParticleSystem *psys)
size[2] = MAX2(size[2], 1);
/* no full offset for flat/thin objects */
- min[0] += d < delta[0] ? d / 2.f : delta[0] / 2.f;
- min[1] += d < delta[1] ? d / 2.f : delta[1] / 2.f;
- min[2] += d < delta[2] ? d / 2.f : delta[2] / 2.f;
+ min[0] += d < delta[0] ? d / 2.0f : delta[0] / 2.0f;
+ min[1] += d < delta[1] ? d / 2.0f : delta[1] / 2.0f;
+ min[2] += d < delta[2] ? d / 2.0f : delta[2] / 2.0f;
for (i = 0, p = 0, pa = psys->particles; i < res; i++) {
for (j = 0; j < res; j++) {
@@ -220,7 +220,7 @@ static void distribute_grid(Mesh *mesh, ParticleSystem *psys)
pa = psys->particles + a1 * a1mul + a2 * a2mul;
copy_v3_v3(co1, pa->fuv);
- co1[a] -= d < delta[a] ? d / 2.f : delta[a] / 2.f;
+ co1[a] -= d < delta[a] ? d / 2.0f : delta[a] / 2.0f;
copy_v3_v3(co2, co1);
co2[a] += delta[a] + 0.001f * d;
co1[a] -= 0.001f * d;
@@ -295,12 +295,12 @@ static void distribute_grid(Mesh *mesh, ParticleSystem *psys)
for (j = 0; j < res; j++) {
for (k = 0; k < res; k++, p++, pa++) {
if (j % 2) {
- pa->fuv[0] += d / 2.f;
+ pa->fuv[0] += d / 2.0f;
}
if (k % 2) {
- pa->fuv[0] += d / 2.f;
- pa->fuv[1] += d / 2.f;
+ pa->fuv[0] += d / 2.0f;
+ pa->fuv[1] += d / 2.0f;
}
}
}
@@ -318,7 +318,7 @@ static void distribute_grid(Mesh *mesh, ParticleSystem *psys)
}
}
- if (psys->part->grid_rand > 0.f) {
+ if (psys->part->grid_rand > 0.0f) {
float rfac = d * psys->part->grid_rand;
for (p = 0, pa = psys->particles; p < psys->totpart; p++, pa++) {
if (pa->flag & PARS_UNEXIST) {
@@ -1052,7 +1052,7 @@ static int psys_thread_context_init_distribute(ParticleThreadContext *ctx,
/* Calculate weights from face areas */
if ((part->flag & PART_EDISTR || children) && from != PART_FROM_VERT) {
MVert *v1, *v2, *v3, *v4;
- float totarea = 0.f, co1[3], co2[3], co3[3], co4[3];
+ float totarea = 0.0f, co1[3], co2[3], co3[3], co4[3];
float(*orcodata)[3];
orcodata = CustomData_get_layer(&mesh->vdata, CD_ORCO);
diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c
index 060a9b4d794..545f677e10a 100644
--- a/source/blender/blenkernel/intern/particle_system.c
+++ b/source/blender/blenkernel/intern/particle_system.c
@@ -574,7 +574,7 @@ static void init_particle_texture(ParticleSimulationData *sim, ParticleData *pa,
ParticleSettings *part = psys->part;
ParticleTexture ptex;
- psys_get_texture(sim, pa, &ptex, PAMAP_INIT, 0.f);
+ psys_get_texture(sim, pa, &ptex, PAMAP_INIT, 0.0f);
switch (part->type) {
case PART_EMITTER:
@@ -587,7 +587,7 @@ static void init_particle_texture(ParticleSimulationData *sim, ParticleData *pa,
if (ptex.exist < psys_frand(psys, p + 125)) {
pa->flag |= PARS_UNEXIST;
}
- pa->time = 0.f;
+ pa->time = 0.0f;
break;
}
}
@@ -697,28 +697,28 @@ static void get_angular_velocity_vector(short avemode, ParticleKey *state, float
case PART_AVE_HORIZONTAL: {
float zvec[3];
zvec[0] = zvec[1] = 0;
- zvec[2] = 1.f;
+ zvec[2] = 1.0f;
cross_v3_v3v3(vec, state->vel, zvec);
break;
}
case PART_AVE_VERTICAL: {
float zvec[3], temp[3];
zvec[0] = zvec[1] = 0;
- zvec[2] = 1.f;
+ zvec[2] = 1.0f;
cross_v3_v3v3(temp, state->vel, zvec);
cross_v3_v3v3(vec, temp, state->vel);
break;
}
case PART_AVE_GLOBAL_X:
- vec[0] = 1.f;
+ vec[0] = 1.0f;
vec[1] = vec[2] = 0;
break;
case PART_AVE_GLOBAL_Y:
- vec[1] = 1.f;
+ vec[1] = 1.0f;
vec[0] = vec[2] = 0;
break;
case PART_AVE_GLOBAL_Z:
- vec[2] = 1.f;
+ vec[2] = 1.0f;
vec[0] = vec[1] = 0;
break;
}
@@ -864,36 +864,36 @@ void psys_get_birth_coords(
/* -velocity from: */
/* *reactions */
- if (dtime > 0.f) {
+ if (dtime > 0.0f) {
sub_v3_v3v3(vel, pa->state.vel, pa->prev_state.vel);
}
/* *emitter velocity */
- if (dtime != 0.f && part->obfac != 0.f) {
+ if (dtime != 0.0f && part->obfac != 0.0f) {
sub_v3_v3v3(vel, loc, state->co);
mul_v3_fl(vel, part->obfac / dtime);
}
/* *emitter normal */
- if (part->normfac != 0.f) {
+ if (part->normfac != 0.0f) {
madd_v3_v3fl(vel, nor, part->normfac);
}
/* *emitter tangent */
- if (sim->psmd && part->tanfac != 0.f) {
+ if (sim->psmd && part->tanfac != 0.0f) {
madd_v3_v3fl(vel, vtan, part->tanfac);
}
/* *emitter object orientation */
- if (part->ob_vel[0] != 0.f) {
+ if (part->ob_vel[0] != 0.0f) {
normalize_v3_v3(vec, ob->obmat[0]);
madd_v3_v3fl(vel, vec, part->ob_vel[0]);
}
- if (part->ob_vel[1] != 0.f) {
+ if (part->ob_vel[1] != 0.0f) {
normalize_v3_v3(vec, ob->obmat[1]);
madd_v3_v3fl(vel, vec, part->ob_vel[1]);
}
- if (part->ob_vel[2] != 0.f) {
+ if (part->ob_vel[2] != 0.0f) {
normalize_v3_v3(vec, ob->obmat[2]);
madd_v3_v3fl(vel, vec, part->ob_vel[2]);
}
@@ -902,12 +902,12 @@ void psys_get_birth_coords(
/* TODO */
/* *random */
- if (part->randfac != 0.f) {
+ if (part->randfac != 0.0f) {
madd_v3_v3fl(vel, r_vel, part->randfac);
}
/* *particle */
- if (part->partfac != 0.f) {
+ if (part->partfac != 0.0f) {
madd_v3_v3fl(vel, p_vel, part->partfac);
}
@@ -1077,7 +1077,7 @@ void reset_particle(ParticleSimulationData *sim, ParticleData *pa, float dtime,
part = psys->part;
/* get precise emitter matrix if particle is born */
- if (part->type != PART_HAIR && dtime > 0.f && pa->time < cfra && pa->time >= sim->psys->cfra) {
+ if (part->type != PART_HAIR && dtime > 0.0f && pa->time < cfra && pa->time >= sim->psys->cfra) {
evaluate_emitter_anim(sim->depsgraph, sim->scene, sim->ob, pa->time);
psys->flag |= PSYS_OB_ANIM_RESTORE;
@@ -1427,7 +1427,7 @@ static void integrate_particle(
copy_v3_v3(oldpos, pa->state.co);
/* Verlet integration behaves strangely with moving emitters, so do first step with euler. */
- if (pa->prev_state.time < 0.f && integrator == PART_INT_VERLET) {
+ if (pa->prev_state.time < 0.0f && integrator == PART_INT_VERLET) {
integrator = PART_INT_EULER;
}
@@ -1450,7 +1450,7 @@ static void integrate_particle(
copy_particle_key(states + i, &pa->state, 1);
}
- states->time = 0.f;
+ states->time = 0.0f;
for (i = 0; i < steps; i++) {
zero_v3(force);
@@ -1611,9 +1611,9 @@ static void sph_springs_modify(ParticleSystem *psys, float dtime)
float yield_ratio = fluid->yield_ratio;
float plasticity = fluid->plasticity_constant;
/* scale things according to dtime */
- float timefix = 25.f * dtime;
+ float timefix = 25.0f * dtime;
- if ((fluid->flag & SPH_VISCOELASTIC_SPRINGS) == 0 || fluid->spring_k == 0.f) {
+ if ((fluid->flag & SPH_VISCOELASTIC_SPRINGS) == 0 || fluid->spring_k == 0.0f) {
return;
}
@@ -1636,7 +1636,7 @@ static void sph_springs_modify(ParticleSystem *psys, float dtime)
spring->rest_length -= plasticity * (Lij - d - rij) * timefix;
}
- h = 4.f * pa1->size;
+ h = 4.0f * pa1->size;
if (spring->rest_length > h) {
spring->delete_flag = 1;
@@ -1743,7 +1743,7 @@ static void sph_density_accum_cb(void *userdata, int index, const float co[3], f
pfr->tot_neighbors++;
dist = sqrtf(squared_dist);
- q = (1.f - dist / pfr->h) * pfr->massfac;
+ q = (1.0f - dist / pfr->h) * pfr->massfac;
if (pfr->use_size) {
q *= npa->size;
@@ -1799,7 +1799,7 @@ static void sph_force_cb(void *sphdata_v, ParticleKey *state, float *force, floa
float visc = fluid->viscosity_omega;
float stiff_visc = fluid->viscosity_beta *
- (fluid->flag & SPH_FAC_VISCOSITY ? fluid->viscosity_omega : 1.f);
+ (fluid->flag & SPH_FAC_VISCOSITY ? fluid->viscosity_omega : 1.0f);
float inv_mass = 1.0f / sphdata->mass;
float spring_constant = fluid->spring_k;
@@ -1809,13 +1809,13 @@ static void sph_force_cb(void *sphdata_v, ParticleKey *state, float *force, floa
(fluid->flag & SPH_FAC_RADIUS ? 4.0f * pa->size : 1.0f);
float h = interaction_radius * sphdata->hfac;
/* 4.77 is an experimentally determined density factor */
- float rest_density = fluid->rest_density * (fluid->flag & SPH_FAC_DENSITY ? 4.77f : 1.f);
+ float rest_density = fluid->rest_density * (fluid->flag & SPH_FAC_DENSITY ? 4.77f : 1.0f);
float rest_length = fluid->rest_length *
- (fluid->flag & SPH_FAC_REST_LENGTH ? 2.588f * pa->size : 1.f);
+ (fluid->flag & SPH_FAC_REST_LENGTH ? 2.588f * pa->size : 1.0f);
float stiffness = fluid->stiffness_k;
float stiffness_near_fac = fluid->stiffness_knear *
- (fluid->flag & SPH_FAC_REPULSION ? fluid->stiffness_k : 1.f);
+ (fluid->flag & SPH_FAC_REPULSION ? fluid->stiffness_k : 1.0f);
ParticleData *npa;
float vec[3];
@@ -1849,7 +1849,7 @@ static void sph_force_cb(void *sphdata_v, ParticleKey *state, float *force, floa
sub_v3_v3v3(vec, co, state->co);
rij = normalize_v3(vec);
- q = (1.f - rij / h) * pfn->psys->part->mass * inv_mass;
+ q = (1.0f - rij / h) * pfn->psys->part->mass * inv_mass;
if (pfn->psys->part->flag & PART_SIZEMASS) {
q *= npa->size;
@@ -1861,20 +1861,20 @@ static void sph_force_cb(void *sphdata_v, ParticleKey *state, float *force, floa
madd_v3_v3fl(force, vec, -(pressure + near_pressure * q) * q);
/* Viscosity */
- if (visc > 0.f || stiff_visc > 0.f) {
+ if (visc > 0.0f || stiff_visc > 0.0f) {
sub_v3_v3v3(dv, vel, state->vel);
u = dot_v3v3(vec, dv);
- if (u < 0.f && visc > 0.f) {
+ if (u < 0.0f && visc > 0.0f) {
madd_v3_v3fl(force, vec, 0.5f * q * visc * u);
}
- if (u > 0.f && stiff_visc > 0.f) {
+ if (u > 0.0f && stiff_visc > 0.0f) {
madd_v3_v3fl(force, vec, 0.5f * q * stiff_visc * u);
}
}
- if (spring_constant > 0.f) {
+ if (spring_constant > 0.0f) {
/* Viscoelastic spring force */
if (pfn->psys == psys[0] && fluid->flag & SPH_VISCOELASTIC_SPRINGS && springhash) {
/* BLI_edgehash_lookup appears to be thread-safe. - z0r */
@@ -1883,8 +1883,9 @@ static void sph_force_cb(void *sphdata_v, ParticleKey *state, float *force, floa
if (spring_index) {
spring = psys[0]->fluid_springs + spring_index - 1;
- madd_v3_v3fl(
- force, vec, -10.f * spring_constant * (1.f - rij / h) * (spring->rest_length - rij));
+ madd_v3_v3fl(force,
+ vec,
+ -10.0f * spring_constant * (1.0f - rij / h) * (spring->rest_length - rij));
}
else if (fluid->spring_frames == 0 ||
(pa->prev_state.time - pa->time) <= fluid->spring_frames) {
@@ -1898,13 +1899,14 @@ static void sph_force_cb(void *sphdata_v, ParticleKey *state, float *force, floa
}
}
else { /* PART_SPRING_HOOKES - Hooke's spring force */
- madd_v3_v3fl(force, vec, -10.f * spring_constant * (1.f - rij / h) * (rest_length - rij));
+ madd_v3_v3fl(
+ force, vec, -10.0f * spring_constant * (1.0f - rij / h) * (rest_length - rij));
}
}
}
/* Artificial buoyancy force in negative gravity direction */
- if (fluid->buoyancy > 0.f && gravity) {
+ if (fluid->buoyancy > 0.0f && gravity) {
madd_v3_v3fl(force, gravity, fluid->buoyancy * (density - rest_density));
}
@@ -1922,7 +1924,7 @@ static void sphclassical_density_accum_cb(void *userdata,
SPHRangeData *pfr = (SPHRangeData *)userdata;
ParticleData *npa = pfr->npsys->particles + index;
float q;
- float qfac = 21.0f / (256.f * (float)M_PI);
+ float qfac = 21.0f / (256.0f * (float)M_PI);
float rij, rij_h;
float vec[3];
@@ -2079,7 +2081,7 @@ static void sphclassical_force_cb(void *sphdata_v,
}
/* Artificial buoyancy force in negative gravity direction */
- if (fluid->buoyancy > 0.f && gravity) {
+ if (fluid->buoyancy > 0.0f && gravity) {
madd_v3_v3fl(force, gravity, fluid->buoyancy * (pa->sphdensity - rest_density));
}
@@ -2199,7 +2201,7 @@ static void sph_integrate(ParticleSimulationData *sim,
{
ParticleSettings *part = sim->psys->part;
// float timestep = psys_get_timestep(sim); // UNUSED
- float pa_mass = part->mass * (part->flag & PART_SIZEMASS ? pa->size : 1.f);
+ float pa_mass = part->mass * (part->flag & PART_SIZEMASS ? pa->size : 1.0f);
float dtime = dfra * psys_get_timestep(sim);
// int steps = 1; // UNUSED
float effector_acceleration[3];
@@ -2211,7 +2213,7 @@ static void sph_integrate(ParticleSimulationData *sim,
/* restore previous state and treat gravity & effectors as external acceleration*/
sub_v3_v3v3(effector_acceleration, pa->state.vel, pa->prev_state.vel);
- mul_v3_fl(effector_acceleration, 1.f / dtime);
+ mul_v3_fl(effector_acceleration, 1.0f / dtime);
copy_particle_key(&pa->state, &pa->prev_state, 0);
@@ -2300,8 +2302,8 @@ static void basic_integrate(ParticleSimulationData *sim, int p, float dfra, floa
integrate_particle(part, pa, dtime, gravity, basic_force_cb, &efdata);
/* damp affects final velocity */
- if (part->dampfac != 0.f) {
- mul_v3_fl(pa->state.vel, 1.f - part->dampfac * efdata.ptex.damp * 25.f * dtime);
+ if (part->dampfac != 0.0f) {
+ mul_v3_fl(pa->state.vel, 1.0f - part->dampfac * efdata.ptex.damp * 25.0f * dtime);
}
// copy_v3_v3(pa->state.ave, states->ave);
@@ -2406,7 +2408,7 @@ static float nr_signed_distance_to_plane(float *p,
d = dot_v3v3(p0, nor);
if (pce->inv_nor == -1) {
- if (d < 0.f) {
+ if (d < 0.0f) {
pce->inv_nor = 1;
}
else {
@@ -2452,7 +2454,7 @@ static void collision_interpolate_element(ParticleCollisionElement *pce,
/* fac is the starting factor for current collision iteration */
/* The col->fac's are factors for the particle subframe step start
* and end during collision modifier step. */
- float f = fac + t * (1.f - fac);
+ float f = fac + t * (1.0f - fac);
float mul = col->fac1 + f * (col->fac2 - col->fac1);
if (pce->tot > 0) {
madd_v3_v3v3fl(pce->x0, pce->x[0], pce->v[0], mul);
@@ -2485,8 +2487,8 @@ static void collision_point_velocity(ParticleCollisionElement *pce)
static float collision_point_distance_with_normal(
float p[3], ParticleCollisionElement *pce, float fac, ParticleCollision *col, float *nor)
{
- if (fac >= 0.f) {
- collision_interpolate_element(pce, 0.f, fac, col);
+ if (fac >= 0.0f) {
+ collision_interpolate_element(pce, 0.0f, fac, col);
}
switch (pce->tot) {
@@ -2504,14 +2506,14 @@ static float collision_point_distance_with_normal(
return normalize_v3(nor);
}
case 3:
- return nr_signed_distance_to_plane(p, 0.f, pce, nor);
+ return nr_signed_distance_to_plane(p, 0.0f, pce, nor);
}
return 0;
}
static void collision_point_on_surface(
const float p[3], ParticleCollisionElement *pce, float fac, ParticleCollision *col, float *co)
{
- collision_interpolate_element(pce, 0.f, fac, col);
+ collision_interpolate_element(pce, 0.0f, fac, col);
switch (pce->tot) {
case 1: {
@@ -2575,11 +2577,11 @@ static float collision_newton_rhapson(ParticleCollision *col,
}
/* start from the beginning */
- t0 = 0.f;
+ t0 = 0.0f;
collision_interpolate_element(pce, t0, col->f, col);
d0 = distance_func(col->co1, radius, pce, n);
t1 = dt_init;
- d1 = 0.f;
+ d1 = 0.0f;
for (iter = 0; iter < 10; iter++) { //, itersum++) {
/* get current location */
@@ -2589,11 +2591,11 @@ static float collision_newton_rhapson(ParticleCollision *col,
d1 = distance_func(pce->p, radius, pce, n);
/* particle already inside face, so report collision */
- if (iter == 0 && d0 < 0.f && d0 > -radius) {
+ if (iter == 0 && d0 < 0.0f && d0 > -radius) {
copy_v3_v3(pce->p, col->co1);
copy_v3_v3(pce->nor, n);
pce->inside = 1;
- return 0.f;
+ return 0.0f;
}
/* Zero gradient (no movement relative to element). Can't step from
@@ -2602,15 +2604,15 @@ static float collision_newton_rhapson(ParticleCollision *col,
/* If first iteration, try from other end where the gradient may be
* greater. Note: code duplicated below. */
if (iter == 0) {
- t0 = 1.f;
+ t0 = 1.0f;
collision_interpolate_element(pce, t0, col->f, col);
d0 = distance_func(col->co2, radius, pce, n);
t1 = 1.0f - dt_init;
- d1 = 0.f;
+ d1 = 0.0f;
continue;
}
- return -1.f;
+ return -1.0f;
}
dd = (t1 - t0) / (d1 - d0);
@@ -2622,30 +2624,30 @@ static float collision_newton_rhapson(ParticleCollision *col,
/* Particle moving away from plane could also mean a strangely rotating
* face, so check from end. Note: code duplicated above. */
- if (iter == 0 && t1 < 0.f) {
- t0 = 1.f;
+ if (iter == 0 && t1 < 0.0f) {
+ t0 = 1.0f;
collision_interpolate_element(pce, t0, col->f, col);
d0 = distance_func(col->co2, radius, pce, n);
t1 = 1.0f - dt_init;
- d1 = 0.f;
+ d1 = 0.0f;
continue;
}
- if (iter == 1 && (t1 < -COLLISION_ZERO || t1 > 1.f)) {
- return -1.f;
+ if (iter == 1 && (t1 < -COLLISION_ZERO || t1 > 1.0f)) {
+ return -1.0f;
}
if (d1 <= COLLISION_ZERO && d1 >= -COLLISION_ZERO) {
- if (t1 >= -COLLISION_ZERO && t1 <= 1.f) {
+ if (t1 >= -COLLISION_ZERO && t1 <= 1.0f) {
if (distance_func == nr_signed_distance_to_plane) {
copy_v3_v3(pce->nor, n);
}
- CLAMP(t1, 0.f, 1.f);
+ CLAMP(t1, 0.0f, 1.0f);
return t1;
}
- return -1.f;
+ return -1.0f;
}
}
return -1.0;
@@ -2663,7 +2665,7 @@ static int collision_sphere_to_tri(ParticleCollision *col,
ct = collision_newton_rhapson(col, radius, pce, nr_signed_distance_to_plane);
- if (ct >= 0.f && ct < *t && (result->inside == 0 || pce->inside == 1)) {
+ if (ct >= 0.0f && ct < *t && (result->inside == 0 || pce->inside == 1)) {
float e1[3], e2[3], p0[3];
float e1e1, e1e2, e1p0, e2e2, e2p0, inv;
@@ -2678,11 +2680,11 @@ static int collision_sphere_to_tri(ParticleCollision *col,
e2e2 = dot_v3v3(e2, e2);
e2p0 = dot_v3v3(e2, p0);
- inv = 1.f / (e1e1 * e2e2 - e1e2 * e1e2);
+ inv = 1.0f / (e1e1 * e2e2 - e1e2 * e1e2);
u = (e2e2 * e1p0 - e1e2 * e2p0) * inv;
v = (e1e1 * e2p0 - e1e2 * e1p0) * inv;
- if (u >= 0.f && u <= 1.f && v >= 0.f && u + v <= 1.f) {
+ if (u >= 0.0f && u <= 1.0f && v >= 0.0f && u + v <= 1.0f) {
*result = *pce;
/* normal already calculated in pce */
@@ -2718,14 +2720,14 @@ static int collision_sphere_to_edges(ParticleCollision *col,
ct = collision_newton_rhapson(col, radius, cur, nr_distance_to_edge);
- if (ct >= 0.f && ct < *t) {
+ if (ct >= 0.0f && ct < *t) {
float u, e[3], vec[3];
sub_v3_v3v3(e, cur->x1, cur->x0);
sub_v3_v3v3(vec, cur->p, cur->x0);
u = dot_v3v3(vec, e) / dot_v3v3(e, e);
- if (u < 0.f || u > 1.f) {
+ if (u < 0.0f || u > 1.0f) {
break;
}
@@ -2763,7 +2765,7 @@ static int collision_sphere_to_verts(ParticleCollision *col,
ct = collision_newton_rhapson(col, radius, cur, nr_distance_to_vert);
- if (ct >= 0.f && ct < *t) {
+ if (ct >= 0.0f && ct < *t) {
*result = *cur;
sub_v3_v3v3(result->nor, cur->p, cur->x0);
@@ -3019,7 +3021,7 @@ static int collision_response(ParticleSimulationData *sim,
(vc_dot < 0.0f && v0_dot < 0.0f && vc_dot < v0_dot))) {
mul_v3_v3fl(v0_nor, pce->nor, vc_dot);
}
- else if (v0_dot > 0.f) {
+ else if (v0_dot > 0.0f) {
mul_v3_v3fl(v0_nor, pce->nor, vc_dot + v0_dot);
}
else {
@@ -3045,25 +3047,25 @@ static int collision_response(ParticleSimulationData *sim,
/* make sure particle stays on the right side of the surface */
if (!through) {
- distance = collision_point_distance_with_normal(co, pce, -1.f, col, nor);
+ distance = collision_point_distance_with_normal(co, pce, -1.0f, col, nor);
if (distance < col->radius + COLLISION_MIN_DISTANCE) {
madd_v3_v3fl(co, nor, col->radius + COLLISION_MIN_DISTANCE - distance);
}
dot = dot_v3v3(nor, v0);
- if (dot < 0.f) {
+ if (dot < 0.0f) {
madd_v3_v3fl(v0, nor, -dot);
}
- distance = collision_point_distance_with_normal(pa->state.co, pce, 1.f, col, nor);
+ distance = collision_point_distance_with_normal(pa->state.co, pce, 1.0f, col, nor);
if (distance < col->radius + COLLISION_MIN_DISTANCE) {
madd_v3_v3fl(pa->state.co, nor, col->radius + COLLISION_MIN_DISTANCE - distance);
}
dot = dot_v3v3(nor, pa->state.vel);
- if (dot < 0.f) {
+ if (dot < 0.0f) {
madd_v3_v3fl(pa->state.vel, nor, -dot);
}
}
@@ -3090,7 +3092,7 @@ static int collision_response(ParticleSimulationData *sim,
static void collision_fail(ParticleData *pa, ParticleCollision *col)
{
/* final chance to prevent total failure, so stick to the surface and hope for the best */
- collision_point_on_surface(col->co1, &col->pce, 1.f, col, pa->state.co);
+ collision_point_on_surface(col->co1, &col->pce, 1.0f, col, pa->state.co);
copy_v3_v3(pa->state.vel, col->pce.vel);
mul_v3_fl(pa->state.vel, col->inv_timestep);
@@ -3128,7 +3130,7 @@ static void collision_check(ParticleSimulationData *sim, int p, float dfra, floa
/* get acceleration (from gravity, forcefields etc. to be re-applied in collision response) */
sub_v3_v3v3(col.acc, pa->state.vel, pa->prev_state.vel);
- mul_v3_fl(col.acc, 1.f / col.total_time);
+ mul_v3_fl(col.acc, 1.0f / col.total_time);
/* set values for first iteration */
copy_v3_v3(col.co1, pa->prev_state.co);
@@ -3925,7 +3927,7 @@ static void dynamics_step(ParticleSimulationData *sim, float cfra)
if (ELEM(pa->alive, PARS_ALIVE, PARS_DYING) == 0 ||
(pa->flag & (PARS_UNEXIST | PARS_NO_DISP))) {
- pa->state.time = -1.f;
+ pa->state.time = -1.0f;
}
}
@@ -4410,7 +4412,7 @@ static void particles_fluid_step(ParticleSimulationData *sim,
zero_v3(pa->state.ave);
unit_qt(pa->state.rot);
- pa->time = 1.f;
+ pa->time = 1.0f;
pa->dietime = sim->scene->r.efra + 1;
pa->lifetime = sim->scene->r.efra;
pa->alive = PARS_ALIVE;
@@ -4590,8 +4592,8 @@ static void system_step(ParticleSimulationData *sim, float cfra, const bool use_
dt_frac = psys->dt_frac;
for (t_frac = dt_frac; t_frac <= 1.0f; t_frac += dt_frac) {
sim->courant_num = 0.0f;
- dynamics_step(sim, cfra + dframe + t_frac - 1.f);
- psys->cfra = cfra + dframe + t_frac - 1.f;
+ dynamics_step(sim, cfra + dframe + t_frac - 1.0f);
+ psys->cfra = cfra + dframe + t_frac - 1.0f;
if (part->time_flag & PART_TIME_AUTOSF) {
update_timestep(psys, sim);
@@ -4692,17 +4694,17 @@ void BKE_particlesettings_fluid_default_settings(ParticleSettings *part)
{
SPHFluidSettings *fluid = part->fluid;
- fluid->spring_k = 0.f;
+ fluid->spring_k = 0.0f;
fluid->plasticity_constant = 0.1f;
fluid->yield_ratio = 0.1f;
- fluid->rest_length = 1.f;
- fluid->viscosity_omega = 2.f;
+ fluid->rest_length = 1.0f;
+ fluid->viscosity_omega = 2.0f;
fluid->viscosity_beta = 0.1f;
- fluid->stiffness_k = 1.f;
- fluid->stiffness_knear = 1.f;
- fluid->rest_density = 1.f;
- fluid->buoyancy = 0.f;
- fluid->radius = 1.f;
+ fluid->stiffness_k = 1.0f;
+ fluid->stiffness_knear = 1.0f;
+ fluid->rest_density = 1.0f;
+ fluid->buoyancy = 0.0f;
+ fluid->radius = 1.0f;
fluid->flag |= SPH_FAC_REPULSION | SPH_FAC_DENSITY | SPH_FAC_RADIUS | SPH_FAC_VISCOSITY |
SPH_FAC_REST_LENGTH;
}
diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c
index 415250b184b..44de92de04a 100644
--- a/source/blender/blenkernel/intern/pointcache.c
+++ b/source/blender/blenkernel/intern/pointcache.c
@@ -462,7 +462,7 @@ static void ptcache_particle_interpolate(int index,
psys_interpolate_particle(-1, keys, (cfra - cfra1) / dfra, &pa->state, 1);
interp_qt_qtqt(pa->state.rot, keys[1].rot, keys[2].rot, (cfra - cfra1) / dfra);
- mul_v3_fl(pa->state.vel, 1.f / (dfra * timestep));
+ mul_v3_fl(pa->state.vel, 1.0f / (dfra * timestep));
pa->state.time = cfra;
}
diff --git a/source/blender/blenkernel/intern/softbody.c b/source/blender/blenkernel/intern/softbody.c
index bf61c27ee2f..c2fc245ce41 100644
--- a/source/blender/blenkernel/intern/softbody.c
+++ b/source/blender/blenkernel/intern/softbody.c
@@ -1063,7 +1063,7 @@ static int sb_detect_face_pointCached(const float face_v1[3],
GHash *hash;
GHashIterator *ihash;
float nv1[3], edge1[3], edge2[3], d_nvect[3], aabbmin[3], aabbmax[3];
- float facedist, outerfacethickness, tune = 10.f;
+ float facedist, outerfacethickness, tune = 10.0f;
int a, deflected = 0;
aabbmin[0] = min_fff(face_v1[0], face_v2[0], face_v3[0]);
@@ -2797,8 +2797,8 @@ static void reference_to_scratch(Object *ob)
SoftBody *sb = ob->soft;
ReferenceVert *rp;
BodyPoint *bp;
- float accu_pos[3] = {0.f, 0.f, 0.f};
- float accu_mass = 0.f;
+ float accu_pos[3] = {0.0f, 0.0f, 0.0f};
+ float accu_mass = 0.0f;
int a;
sb->scratch->Ref.ivert = MEM_mallocN(sizeof(ReferenceVert) * sb->totpoint, "SB_Reference");
diff --git a/source/blender/blenlib/intern/math_base_inline.c b/source/blender/blenlib/intern/math_base_inline.c
index 1b388dcf11f..8cc5c31a4c7 100644
--- a/source/blender/blenlib/intern/math_base_inline.c
+++ b/source/blender/blenlib/intern/math_base_inline.c
@@ -611,7 +611,7 @@ MINLINE int compare_ff_relative(float a, float b, const float max_diff, const in
MINLINE float signf(float f)
{
- return (f < 0.f) ? -1.f : 1.f;
+ return (f < 0.0f) ? -1.0f : 1.0f;
}
MINLINE float compatible_signf(float f)
diff --git a/source/blender/blenlib/intern/math_geom.c b/source/blender/blenlib/intern/math_geom.c
index dcdc7c4d668..c834108a0de 100644
--- a/source/blender/blenlib/intern/math_geom.c
+++ b/source/blender/blenlib/intern/math_geom.c
@@ -5497,7 +5497,7 @@ void vcloud_estimate_transform_v3(const int list_size,
stunt[1] = q[1][1];
stunt[2] = q[2][2];
/* renormalizing for numeric stability */
- mul_m3_fl(q, 1.f / len_v3(stunt));
+ mul_m3_fl(q, 1.0f / len_v3(stunt));
/* this is pretty much Polardecompose 'inline' the algo based on Higham's thesis */
/* without the far case ... but seems to work here pretty neat */
diff --git a/source/blender/blenlib/intern/math_interp.c b/source/blender/blenlib/intern/math_interp.c
index 13a1816f1bd..3cec3db9806 100644
--- a/source/blender/blenlib/intern/math_interp.c
+++ b/source/blender/blenlib/intern/math_interp.c
@@ -517,7 +517,7 @@ void BLI_bilinear_interpolation_wrap_char(const unsigned char *buffer,
* otherwise at high texture magnifications circular artifacts are visible. */
#define EWA_MAXIDX 255
const float EWA_WTS[EWA_MAXIDX + 1] = {
- 1.f, 0.990965f, 0.982f, 0.973105f, 0.96428f, 0.955524f, 0.946836f,
+ 1.0f, 0.990965f, 0.982f, 0.973105f, 0.96428f, 0.955524f, 0.946836f,
0.938216f, 0.929664f, 0.921178f, 0.912759f, 0.904405f, 0.896117f, 0.887893f,
0.879734f, 0.871638f, 0.863605f, 0.855636f, 0.847728f, 0.839883f, 0.832098f,
0.824375f, 0.816712f, 0.809108f, 0.801564f, 0.794079f, 0.786653f, 0.779284f,
@@ -553,7 +553,7 @@ const float EWA_WTS[EWA_MAXIDX + 1] = {
0.0324175f, 0.0309415f, 0.029477f, 0.0280239f, 0.0265822f, 0.0251517f, 0.0237324f,
0.0223242f, 0.020927f, 0.0195408f, 0.0181653f, 0.0168006f, 0.0154466f, 0.0141031f,
0.0127701f, 0.0114476f, 0.0101354f, 0.00883339f, 0.00754159f, 0.00625989f, 0.00498819f,
- 0.00372644f, 0.00247454f, 0.00123242f, 0.f,
+ 0.00372644f, 0.00247454f, 0.00123242f, 0.0f,
};
static void radangle2imp(float a2, float b2, float th, float *A, float *B, float *C, float *F)
@@ -625,7 +625,7 @@ void BLI_ewa_filter(const int width,
* Use a different radius based on interpolation switch,
* just enough to anti-alias when interpolation is off,
* and slightly larger to make result a bit smoother than bilinear interpolation when
- * interpolation is on (minimum values: const float rmin = intpol ? 1.f : 0.5f;) */
+ * interpolation is on (minimum values: const float rmin = intpol ? 1.0f : 0.5f;) */
const float rmin = (intpol ? 1.5625f : 0.765625f) / ff2;
BLI_ewa_imp2radangle(A, B, C, F, &a, &b, &th, &ecc);
if ((b2 = b * b) < rmin) {
diff --git a/source/blender/blenlib/intern/math_matrix.c b/source/blender/blenlib/intern/math_matrix.c
index 9769d2baf9b..1de69499c8d 100644
--- a/source/blender/blenlib/intern/math_matrix.c
+++ b/source/blender/blenlib/intern/math_matrix.c
@@ -2920,7 +2920,7 @@ void svd_m4(float U[4][4], float s[4], float V[4][4], float A_[4][4])
if (ks == k) {
break;
}
- t = (ks != p ? fabsf(e[ks]) : 0.f) + (ks != k + 1 ? fabsf(e[ks - 1]) : 0.0f);
+ t = (ks != p ? fabsf(e[ks]) : 0.0f) + (ks != k + 1 ? fabsf(e[ks - 1]) : 0.0f);
if (fabsf(s[ks]) <= eps * t) {
s[ks] = 0.0f;
break;
diff --git a/source/blender/blenlib/intern/noise.c b/source/blender/blenlib/intern/noise.c
index bc8135605a8..cca08feee0d 100644
--- a/source/blender/blenlib/intern/noise.c
+++ b/source/blender/blenlib/intern/noise.c
@@ -1051,8 +1051,8 @@ static float voronoi_F1F2(float x, float y, float z)
static float voronoi_Cr(float x, float y, float z)
{
float t = 10 * voronoi_F1F2(x, y, z);
- if (t > 1.f) {
- return 1.f;
+ if (t > 1.0f) {
+ return 1.0f;
}
return t;
}
@@ -1099,8 +1099,8 @@ static float voronoi_F1F2S(float x, float y, float z)
static float voronoi_CrS(float x, float y, float z)
{
float t = 10 * voronoi_F1F2(x, y, z);
- if (t > 1.f) {
- return 1.f;
+ if (t > 1.0f) {
+ return 1.0f;
}
return (2.0f * t - 1.0f);
}
@@ -1572,7 +1572,7 @@ float BLI_noise_mg_hybrid_multi_fractal(float x,
}
float rmd = octaves - floorf(octaves);
- if (rmd != 0.f) {
+ if (rmd != 0.0f) {
result += rmd * ((noisefunc(x, y, z) + offset) * pwr);
}
diff --git a/source/blender/blenlib/intern/voxel.c b/source/blender/blenlib/intern/voxel.c
index 2c8eb9f5a13..eac01a0e2aa 100644
--- a/source/blender/blenlib/intern/voxel.c
+++ b/source/blender/blenlib/intern/voxel.c
@@ -51,7 +51,7 @@ float BLI_voxel_sample_nearest(const float *data, const int res[3], const float
BLI_INLINE int FLOORI(float x)
{
const int r = (int)x;
- return ((x >= 0.f) || (float)r == x) ? r : (r - 1);
+ return ((x >= 0.0f) || (float)r == x) ? r : (r - 1);
}
/* clamp function, cannot use the CLAMPIS macro,
@@ -92,9 +92,9 @@ float BLI_voxel_sample_trilinear(const float *data, const int res[3], const floa
const float dy = yf - (float)y;
const float dz = zf - (float)z;
- const float u[2] = {1.f - dx, dx};
- const float v[2] = {1.f - dy, dy};
- const float w[2] = {1.f - dz, dz};
+ const float u[2] = {1.0f - dx, dx};
+ const float v[2] = {1.0f - dy, dy};
+ const float w[2] = {1.0f - dz, dz};
return w[0] *
(v[0] * (u[0] * data[xc[0] + yc[0] + zc[0]] + u[1] * data[xc[1] + yc[0] + zc[0]]) +
@@ -103,7 +103,7 @@ float BLI_voxel_sample_trilinear(const float *data, const int res[3], const floa
(v[0] * (u[0] * data[xc[0] + yc[0] + zc[1]] + u[1] * data[xc[1] + yc[0] + zc[1]]) +
v[1] * (u[0] * data[xc[0] + yc[1] + zc[1]] + u[1] * data[xc[1] + yc[1] + zc[1]]));
}
- return 0.f;
+ return 0.0f;
}
float BLI_voxel_sample_triquadratic(const float *data, const int res[3], const float co[3])
@@ -132,9 +132,9 @@ float BLI_voxel_sample_triquadratic(const float *data, const int res[3], const f
};
const float dx = xf - (float)x, dy = yf - (float)y, dz = zf - (float)z;
- const float u[3] = {dx * (0.5f * dx - 1.f) + 0.5f, dx * (1.0f - dx) + 0.5f, 0.5f * dx * dx};
- const float v[3] = {dy * (0.5f * dy - 1.f) + 0.5f, dy * (1.0f - dy) + 0.5f, 0.5f * dy * dy};
- const float w[3] = {dz * (0.5f * dz - 1.f) + 0.5f, dz * (1.0f - dz) + 0.5f, 0.5f * dz * dz};
+ const float u[3] = {dx * (0.5f * dx - 1.0f) + 0.5f, dx * (1.0f - dx) + 0.5f, 0.5f * dx * dx};
+ const float v[3] = {dy * (0.5f * dy - 1.0f) + 0.5f, dy * (1.0f - dy) + 0.5f, 0.5f * dy * dy};
+ const float w[3] = {dz * (0.5f * dz - 1.0f) + 0.5f, dz * (1.0f - dz) + 0.5f, 0.5f * dz * dz};
return w[0] *
(v[0] * (u[0] * data[xc[0] + yc[0] + zc[0]] + u[1] * data[xc[1] + yc[0] + zc[0]] +
@@ -158,7 +158,7 @@ float BLI_voxel_sample_triquadratic(const float *data, const int res[3], const f
v[2] * (u[0] * data[xc[0] + yc[2] + zc[2]] + u[1] * data[xc[1] + yc[2] + zc[2]] +
u[2] * data[xc[2] + yc[2] + zc[2]]));
}
- return 0.f;
+ return 0.0f;
}
float BLI_voxel_sample_tricubic(const float *data,
@@ -195,18 +195,18 @@ float BLI_voxel_sample_tricubic(const float *data,
float u[4], v[4], w[4];
if (bspline) { // B-Spline
- u[0] = (((-1.f / 6.f) * dx + 0.5f) * dx - 0.5f) * dx + (1.f / 6.f);
- u[1] = ((0.5f * dx - 1.f) * dx) * dx + (2.f / 3.f);
- u[2] = ((-0.5f * dx + 0.5f) * dx + 0.5f) * dx + (1.f / 6.f);
- u[3] = (1.f / 6.f) * dx * dx * dx;
- v[0] = (((-1.f / 6.f) * dy + 0.5f) * dy - 0.5f) * dy + (1.f / 6.f);
- v[1] = ((0.5f * dy - 1.f) * dy) * dy + (2.f / 3.f);
- v[2] = ((-0.5f * dy + 0.5f) * dy + 0.5f) * dy + (1.f / 6.f);
- v[3] = (1.f / 6.f) * dy * dy * dy;
- w[0] = (((-1.f / 6.f) * dz + 0.5f) * dz - 0.5f) * dz + (1.f / 6.f);
- w[1] = ((0.5f * dz - 1.f) * dz) * dz + (2.f / 3.f);
- w[2] = ((-0.5f * dz + 0.5f) * dz + 0.5f) * dz + (1.f / 6.f);
- w[3] = (1.f / 6.f) * dz * dz * dz;
+ u[0] = (((-1.0f / 6.0f) * dx + 0.5f) * dx - 0.5f) * dx + (1.0f / 6.0f);
+ u[1] = ((0.5f * dx - 1.0f) * dx) * dx + (2.0f / 3.0f);
+ u[2] = ((-0.5f * dx + 0.5f) * dx + 0.5f) * dx + (1.0f / 6.0f);
+ u[3] = (1.0f / 6.0f) * dx * dx * dx;
+ v[0] = (((-1.0f / 6.0f) * dy + 0.5f) * dy - 0.5f) * dy + (1.0f / 6.0f);
+ v[1] = ((0.5f * dy - 1.0f) * dy) * dy + (2.0f / 3.0f);
+ v[2] = ((-0.5f * dy + 0.5f) * dy + 0.5f) * dy + (1.0f / 6.0f);
+ v[3] = (1.0f / 6.0f) * dy * dy * dy;
+ w[0] = (((-1.0f / 6.0f) * dz + 0.5f) * dz - 0.5f) * dz + (1.0f / 6.0f);
+ w[1] = ((0.5f * dz - 1.0f) * dz) * dz + (2.0f / 3.0f);
+ w[2] = ((-0.5f * dz + 0.5f) * dz + 0.5f) * dz + (1.0f / 6.0f);
+ w[3] = (1.0f / 6.0f) * dz * dz * dz;
}
else { // Catmull-Rom
u[0] = ((-0.5f * dx + 1.0f) * dx - 0.5f) * dx;
@@ -260,5 +260,5 @@ float BLI_voxel_sample_tricubic(const float *data,
v[3] * (u[0] * data[xc[0] + yc[3] + zc[3]] + u[1] * data[xc[1] + yc[3] + zc[3]] +
u[2] * data[xc[2] + yc[3] + zc[3]] + u[3] * data[xc[3] + yc[3] + zc[3]]));
}
- return 0.f;
+ return 0.0f;
}
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 28d39a35014..080e22c68b9 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -2661,8 +2661,8 @@ static void direct_link_constraints(BlendDataReader *reader, ListBase *lb)
case CONSTRAINT_TYPE_KINEMATIC: {
bKinematicConstraint *data = con->data;
- con->lin_error = 0.f;
- con->rot_error = 0.f;
+ con->lin_error = 0.0f;
+ con->rot_error = 0.0f;
/* version patch for runtime flag, was not cleared in some case */
data->flag &= ~CONSTRAINT_IK_AUTO;
diff --git a/source/blender/blenloader/intern/versioning_250.c b/source/blender/blenloader/intern/versioning_250.c
index 83cd5dfb6f3..c86ad639216 100644
--- a/source/blender/blenloader/intern/versioning_250.c
+++ b/source/blender/blenloader/intern/versioning_250.c
@@ -1166,7 +1166,7 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain)
if (md->type == eModifierType_Cloth) {
ClothModifierData *clmd = (ClothModifierData *)md;
if (clmd->sim_parms->velocity_smooth < 0.01f) {
- clmd->sim_parms->velocity_smooth = 0.f;
+ clmd->sim_parms->velocity_smooth = 0.0f;
}
}
}
@@ -1501,9 +1501,9 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain)
while (node) {
if (node->type == CMP_NODE_COLORBALANCE) {
NodeColorBalance *n = (NodeColorBalance *)node->storage;
- n->lift[0] += 1.f;
- n->lift[1] += 1.f;
- n->lift[2] += 1.f;
+ n->lift[0] += 1.0f;
+ n->lift[1] += 1.0f;
+ n->lift[2] += 1.0f;
}
node = node->next;
}
@@ -1516,9 +1516,9 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain)
while (node) {
if (node->type == CMP_NODE_COLORBALANCE) {
NodeColorBalance *n = (NodeColorBalance *)node->storage;
- n->lift[0] += 1.f;
- n->lift[1] += 1.f;
- n->lift[2] += 1.f;
+ n->lift[0] += 1.0f;
+ n->lift[1] += 1.0f;
+ n->lift[2] += 1.0f;
}
node = node->next;
@@ -1836,7 +1836,7 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain)
}
part->flag &= ~PART_HAIR_REGROW; /* this was a deprecated flag before */
- part->kink_amp_clump = 1.f; /* keep old files looking similar */
+ part->kink_amp_clump = 1.0f; /* keep old files looking similar */
}
for (screen = bmain->screens.first; screen; screen = screen->id.next) {
diff --git a/source/blender/draw/intern/draw_cache.c b/source/blender/draw/intern/draw_cache.c
index 52e7e91a995..50d4b743d86 100644
--- a/source/blender/draw/intern/draw_cache.c
+++ b/source/blender/draw/intern/draw_cache.c
@@ -1694,8 +1694,8 @@ GPUBatch *DRW_cache_speaker_get(void)
copy_v3_fl3(v, r, 0.0f, z);
GPU_vertbuf_attr_set(vbo, attr_id.pos, vidx++, v);
for (int i = 1; i < segments; i++) {
- float x = cosf(2.f * (float)M_PI * i / segments) * r;
- float y = sinf(2.f * (float)M_PI * i / segments) * r;
+ float x = cosf(2.0f * (float)M_PI * i / segments) * r;
+ float y = sinf(2.0f * (float)M_PI * i / segments) * r;
copy_v3_fl3(v, x, y, z);
GPU_vertbuf_attr_set(vbo, attr_id.pos, vidx++, v);
GPU_vertbuf_attr_set(vbo, attr_id.pos, vidx++, v);
@@ -2463,14 +2463,14 @@ static float axis_marker[8][2] = {
{-1.0f * S_X, -1.0f * S_Y},
{-1.0f * S_X, 1.0f * S_Y}
#else /* diamond */
- {-S_X, 0.f},
- {0.f, S_Y},
- {0.f, S_Y},
- {S_X, 0.f},
- {S_X, 0.f},
- {0.f, -S_Y},
- {0.f, -S_Y},
- {-S_X, 0.f}
+ {-S_X, 0.0f},
+ {0.0f, S_Y},
+ {0.0f, S_Y},
+ {S_X, 0.0f},
+ {S_X, 0.0f},
+ {0.0f, -S_Y},
+ {0.0f, -S_Y},
+ {-S_X, 0.0f}
#endif
};
#define MARKER_LEN (sizeof(axis_marker) / (sizeof(float[2])))
diff --git a/source/blender/editors/curve/editcurve_add.c b/source/blender/editors/curve/editcurve_add.c
index 684666aba13..5e2af960550 100644
--- a/source/blender/editors/curve/editcurve_add.c
+++ b/source/blender/editors/curve/editcurve_add.c
@@ -397,8 +397,8 @@ Nurb *ED_curve_add_nurbs_primitive(
break;
case CU_PRIM_SPHERE: /* sphere */
if (cutype == CU_NURBS) {
- const float tmp_cent[3] = {0.f, 0.f, 0.f};
- const float tmp_vec[3] = {0.f, 0.f, 1.f};
+ const float tmp_cent[3] = {0.0f, 0.0f, 0.0f};
+ const float tmp_vec[3] = {0.0f, 0.0f, 1.0f};
nu->pntsu = 5;
nu->pntsv = 1;
@@ -451,8 +451,8 @@ Nurb *ED_curve_add_nurbs_primitive(
break;
case CU_PRIM_DONUT: /* torus */
if (cutype == CU_NURBS) {
- const float tmp_cent[3] = {0.f, 0.f, 0.f};
- const float tmp_vec[3] = {0.f, 0.f, 1.f};
+ const float tmp_cent[3] = {0.0f, 0.0f, 0.0f};
+ const float tmp_vec[3] = {0.0f, 0.0f, 1.0f};
xzproj = 1;
nu = ED_curve_add_nurbs_primitive(C, obedit, mat, CU_NURBS | CU_PRIM_CIRCLE, 0);
diff --git a/source/blender/editors/curve/editfont.c b/source/blender/editors/curve/editfont.c
index 1eb35b2c647..0a5e35364b2 100644
--- a/source/blender/editors/curve/editfont.c
+++ b/source/blender/editors/curve/editfont.c
@@ -651,7 +651,7 @@ static void txt_add_object(bContext *C,
int nchars = 0, nbytes = 0;
char *s;
int a;
- const float rot[3] = {0.f, 0.f, 0.f};
+ const float rot[3] = {0.0f, 0.0f, 0.0f};
obedit = BKE_object_add(bmain, view_layer, OB_FONT, NULL);
base = view_layer->basact;
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index ac31148340a..bbb66a7e0e4 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -6396,7 +6396,7 @@ static bool ui_numedit_but_HSVCIRCLE(uiBut *but,
* allow choosing a hue for black values, by giving a tiny increment */
if (cpicker->use_color_lock) {
if (U.color_picker_type == USER_CP_CIRCLE_HSV) { /* lock */
- if (hsv[2] == 0.f) {
+ if (hsv[2] == 0.0f) {
hsv[2] = 0.0001f;
}
}
@@ -6499,15 +6499,15 @@ static void ui_ndofedit_but_HSVCIRCLE(uiBut *but,
* allow choosing a hue for black values, by giving a tiny increment */
if (cpicker->use_color_lock) {
if (U.color_picker_type == USER_CP_CIRCLE_HSV) { /* lock */
- if (hsv[2] == 0.f) {
+ if (hsv[2] == 0.0f) {
hsv[2] = 0.0001f;
}
}
else {
- if (hsv[2] == 0.f) {
+ if (hsv[2] == 0.0f) {
hsv[2] = 0.0001f;
}
- if (hsv[2] == 1.f) {
+ if (hsv[2] == 1.0f) {
hsv[2] = 0.9999f;
}
}
@@ -7315,7 +7315,7 @@ static bool ui_numedit_but_HISTOGRAM(uiBut *but, uiHandleButtonData *data, int m
hist->ymax += (dy * 0.1f) * yfac;
/* 0.1 allows us to see HDR colors up to 10 */
- CLAMP(hist->ymax, 0.1f, 100.f);
+ CLAMP(hist->ymax, 0.1f, 100.0f);
data->draglastx = mx;
data->draglasty = my;
@@ -7348,7 +7348,7 @@ static int ui_do_but_HISTOGRAM(
/* XXX hardcoded keymap check.... */
if (event->type == EVT_BACKSPACEKEY && event->val == KM_PRESS) {
Histogram *hist = (Histogram *)but->poin;
- hist->ymax = 1.f;
+ hist->ymax = 1.0f;
button_activate_state(C, but, BUTTON_STATE_EXIT);
return WM_UI_HANDLER_BREAK;
@@ -7421,7 +7421,7 @@ static int ui_do_but_WAVEFORM(
/* XXX hardcoded keymap check.... */
if (event->type == EVT_BACKSPACEKEY && event->val == KM_PRESS) {
Scopes *scopes = (Scopes *)but->poin;
- scopes->wavefrm_yfac = 1.f;
+ scopes->wavefrm_yfac = 1.0f;
button_activate_state(C, but, BUTTON_STATE_EXIT);
return WM_UI_HANDLER_BREAK;
diff --git a/source/blender/editors/interface/interface_intern.h b/source/blender/editors/interface/interface_intern.h
index 1a8b1ae0a1a..c4b54af1396 100644
--- a/source/blender/editors/interface/interface_intern.h
+++ b/source/blender/editors/interface/interface_intern.h
@@ -943,7 +943,7 @@ typedef struct uiWidgetBaseParameters {
/* We pack alpha check and discard factor in alpha_discard.
* If the value is negative then we do alpha check.
* The absolute value itself is the discard factor.
- * Initialize value to 1.0.f if you don't want discard */
+ * Initialize value to 1.0f if you don't want discard. */
float alpha_discard;
float tria_type;
float _pad[3];
diff --git a/source/blender/editors/object/object_vgroup.c b/source/blender/editors/object/object_vgroup.c
index b48b854c238..3d6a6abfe0d 100644
--- a/source/blender/editors/object/object_vgroup.c
+++ b/source/blender/editors/object/object_vgroup.c
@@ -3205,9 +3205,9 @@ void OBJECT_OT_vertex_group_levels(wmOperatorType *ot)
vgroup_operator_subset_select_props(ot, true);
RNA_def_float(
- ot->srna, "offset", 0.f, -1.0, 1.0, "Offset", "Value to add to weights", -1.0f, 1.f);
+ ot->srna, "offset", 0.0f, -1.0, 1.0, "Offset", "Value to add to weights", -1.0f, 1.0f);
RNA_def_float(
- ot->srna, "gain", 1.f, 0.f, FLT_MAX, "Gain", "Value to multiply weights by", 0.0f, 10.f);
+ ot->srna, "gain", 1.0f, 0.0f, FLT_MAX, "Gain", "Value to multiply weights by", 0.0f, 10.0f);
}
/** \} */
@@ -3369,7 +3369,7 @@ void OBJECT_OT_vertex_group_fix(wmOperatorType *ot)
10.0f);
RNA_def_float(ot->srna,
"strength",
- 1.f,
+ 1.0f,
-2.0f,
FLT_MAX,
"Strength",
@@ -3385,7 +3385,7 @@ void OBJECT_OT_vertex_group_fix(wmOperatorType *ot)
"Change Sensitivity",
"Change the amount weights are altered with each iteration: lower values are slower",
0.05f,
- 1.f);
+ 1.0f);
}
/** \} */
diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c
index e6d11398279..63f12e339b9 100644
--- a/source/blender/editors/physics/particle_edit.c
+++ b/source/blender/editors/physics/particle_edit.c
@@ -4438,7 +4438,7 @@ static int brush_add(const bContext *C, PEData *data, short number)
for (k = 0, hkey = pa->hair; k < pset->totaddkey; k++, hkey++) {
madd_v3_v3v3fl(hkey->co, pa->state.co, pa->state.vel, k * framestep * timestep);
hkey->time += k * framestep;
- hkey->weight = 1.f - (float)k / (float)(pset->totaddkey - 1);
+ hkey->weight = 1.0f - (float)k / (float)(pset->totaddkey - 1);
}
}
for (k = 0, hkey = pa->hair; k < pset->totaddkey; k++, hkey++) {
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c
index 6f80165ed3c..1efcc152f37 100644
--- a/source/blender/editors/screen/screen_ops.c
+++ b/source/blender/editors/screen/screen_ops.c
@@ -2827,7 +2827,7 @@ static int frame_offset_exec(bContext *C, wmOperator *op)
CFRA += delta;
FRAMENUMBER_MIN_CLAMP(CFRA);
- SUBFRA = 0.f;
+ SUBFRA = 0.0f;
areas_do_frame_follow(C, false);
diff --git a/source/blender/editors/sculpt_paint/paint_stroke.c b/source/blender/editors/sculpt_paint/paint_stroke.c
index 75357214936..57b1102219e 100644
--- a/source/blender/editors/sculpt_paint/paint_stroke.c
+++ b/source/blender/editors/sculpt_paint/paint_stroke.c
@@ -717,7 +717,7 @@ static float paint_space_stroke_spacing(bContext *C,
spacing *= stroke->zoom_2d;
if (paint_stroke_use_scene_spacing(brush, mode)) {
- return max_ff(0.001f, size_clamp * spacing / 50.f);
+ return max_ff(0.001f, size_clamp * spacing / 50.0f);
}
return max_ff(stroke->zoom_2d, size_clamp * spacing / 50.0f);
}
diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c
index 25b1764e562..e88af7caf42 100644
--- a/source/blender/editors/sculpt_paint/paint_vertex.c
+++ b/source/blender/editors/sculpt_paint/paint_vertex.c
@@ -372,7 +372,7 @@ static float wpaint_blend(const VPaint *wp,
if (do_flip) {
switch (blend) {
case IMB_BLEND_MIX:
- paintval = 1.f - paintval;
+ paintval = 1.0f - paintval;
break;
case IMB_BLEND_ADD:
blend = IMB_BLEND_SUB;
diff --git a/source/blender/editors/sculpt_paint/sculpt_uv.c b/source/blender/editors/sculpt_paint/sculpt_uv.c
index 5be72ec87e7..f77d473ae57 100644
--- a/source/blender/editors/sculpt_paint/sculpt_uv.c
+++ b/source/blender/editors/sculpt_paint/sculpt_uv.c
@@ -172,7 +172,7 @@ static void HC_relaxation_iteration_uv(BMEditMesh *em,
for (i = 0; i < sculptdata->totalUniqueUvs; i++) {
copy_v2_v2(diff, tmp_uvdata[i].sum_co);
- mul_v2_fl(diff, 1.f / tmp_uvdata[i].ncounter);
+ mul_v2_fl(diff, 1.0f / tmp_uvdata[i].ncounter);
copy_v2_v2(tmp_uvdata[i].p, diff);
tmp_uvdata[i].b[0] = diff[0] - sculptdata->uv[i].uv[0];
@@ -260,7 +260,7 @@ static void laplacian_relaxation_iteration_uv(BMEditMesh *em,
* here it is not needed since we translate along the UV plane always. */
for (i = 0; i < sculptdata->totalUniqueUvs; i++) {
copy_v2_v2(tmp_uvdata[i].p, tmp_uvdata[i].sum_co);
- mul_v2_fl(tmp_uvdata[i].p, 1.f / tmp_uvdata[i].ncounter);
+ mul_v2_fl(tmp_uvdata[i].p, 1.0f / tmp_uvdata[i].ncounter);
}
for (i = 0; i < sculptdata->totalUniqueUvs; i++) {
diff --git a/source/blender/editors/space_action/action_edit.c b/source/blender/editors/space_action/action_edit.c
index f058ec5546a..167215b3813 100644
--- a/source/blender/editors/space_action/action_edit.c
+++ b/source/blender/editors/space_action/action_edit.c
@@ -1665,7 +1665,7 @@ static int actkeys_framejump_exec(bContext *C, wmOperator *UNUSED(op))
if (ked.i1) {
Scene *scene = ac.scene;
CFRA = round_fl_to_int(ked.f1 / ked.i1);
- SUBFRA = 0.f;
+ SUBFRA = 0.0f;
}
/* set notifier that things have changed */
diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c
index 9523810aa07..ae15b651059 100644
--- a/source/blender/editors/space_graph/graph_edit.c
+++ b/source/blender/editors/space_graph/graph_edit.c
@@ -2884,7 +2884,7 @@ static int graphkeys_framejump_exec(bContext *C, wmOperator *UNUSED(op))
else {
/* Animation Mode - Affects current frame (int) */
CFRA = round_fl_to_int(sum_time / num_keyframes);
- SUBFRA = 0.f;
+ SUBFRA = 0.0f;
}
sipo->cursorVal = sum_value / (float)num_keyframes;
diff --git a/source/blender/editors/space_view3d/view3d_walk.c b/source/blender/editors/space_view3d/view3d_walk.c
index 7de28096607..665d704e6b2 100644
--- a/source/blender/editors/space_view3d/view3d_walk.c
+++ b/source/blender/editors/space_view3d/view3d_walk.c
@@ -473,8 +473,8 @@ enum {
};
/* keep the previous speed until user changes userpreferences */
-static float base_speed = -1.f;
-static float userdef_speed = -1.f;
+static float base_speed = -1.0f;
+static float userdef_speed = -1.0f;
static bool initWalkInfo(bContext *C, WalkInfo *walk, wmOperator *op)
{
@@ -521,8 +521,9 @@ static bool initWalkInfo(bContext *C, WalkInfo *walk, wmOperator *op)
walk->speed = 0.0f;
walk->is_fast = false;
walk->is_slow = false;
- walk->grid = (walk->scene->unit.system == USER_UNIT_NONE) ? 1.f :
- 1.f / walk->scene->unit.scale_length;
+ walk->grid = (walk->scene->unit.system == USER_UNIT_NONE) ?
+ 1.0f :
+ 1.0f / walk->scene->unit.scale_length;
/* user preference settings */
walk->teleport.duration = U.walk_navigation.teleport_time;
diff --git a/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.cpp b/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.cpp
index ee584f8953c..741c7d6ea41 100644
--- a/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.cpp
+++ b/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.cpp
@@ -61,7 +61,7 @@ NodeGroup *BlenderFileLoader::Load()
_viewplane_bottom = _re->viewplane.ymin;
_viewplane_top = _re->viewplane.ymax;
- if (_re->clip_start < 0.f) {
+ if (_re->clip_start < 0.0f) {
// Adjust clipping start/end and set up a Z offset when the viewport preview
// is used with the orthographic view. In this case, _re->clip_start is negative,
// while Freestyle assumes that imported mesh data are in the camera coordinate
@@ -73,7 +73,7 @@ NodeGroup *BlenderFileLoader::Load()
else {
_z_near = -_re->clip_start;
_z_far = -_re->clip_end;
- _z_offset = 0.f;
+ _z_offset = 0.0f;
}
#if 0
@@ -577,7 +577,7 @@ void BlenderFileLoader::insertShapeNode(Object *ob, Mesh *me, int id)
tmpMat.setLine(mat->line_col[0], mat->line_col[1], mat->line_col[2], mat->line_col[3]);
tmpMat.setDiffuse(mat->r, mat->g, mat->b, 1.0f);
tmpMat.setSpecular(mat->specr, mat->specg, mat->specb, 1.0f);
- tmpMat.setShininess(128.f);
+ tmpMat.setShininess(128.0f);
tmpMat.setPriority(mat->line_priority);
}
diff --git a/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp b/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp
index 2446bfc13dc..9680e7d25a3 100644
--- a/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp
+++ b/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp
@@ -150,10 +150,10 @@ static void init_view(Render *re)
float thickness = 1.0f;
switch (re->r.line_thickness_mode) {
case R_LINE_THICKNESS_ABSOLUTE:
- thickness = re->r.unit_line_thickness * (re->r.size / 100.f);
+ thickness = re->r.unit_line_thickness * (re->r.size / 100.0f);
break;
case R_LINE_THICKNESS_RELATIVE:
- thickness = height / 480.f;
+ thickness = height / 480.0f;
break;
}
diff --git a/source/blender/freestyle/intern/image/ImagePyramid.h b/source/blender/freestyle/intern/image/ImagePyramid.h
index ee8bf69aa10..3b4e5eda52a 100644
--- a/source/blender/freestyle/intern/image/ImagePyramid.h
+++ b/source/blender/freestyle/intern/image/ImagePyramid.h
@@ -87,7 +87,7 @@ class GaussianPyramid : public ImagePyramid {
float _sigma;
public:
- GaussianPyramid(float iSigma = 1.f) : ImagePyramid()
+ GaussianPyramid(float iSigma = 1.0f) : ImagePyramid()
{
_sigma = iSigma;
}
diff --git a/source/blender/freestyle/intern/stroke/Chain.cpp b/source/blender/freestyle/intern/stroke/Chain.cpp
index 562ca32be78..4a0f31bc910 100644
--- a/source/blender/freestyle/intern/stroke/Chain.cpp
+++ b/source/blender/freestyle/intern/stroke/Chain.cpp
@@ -53,7 +53,7 @@ void Chain::push_viewedge_back(ViewEdge *iViewEdge, bool orientation)
}
// Ensure the continuity of underlying FEdges
CurvePoint *cp =
- _Vertices.back(); // assumed to be instantiated as new CurvePoint(iSVertex, 0, 0.f);
+ _Vertices.back(); // assumed to be instantiated as new CurvePoint(iSVertex, 0, 0.0f);
SVertex *sv_first = (*vfirst);
FEdge *fe = _fedgeB->duplicate();
fe->setTemporary(true);
@@ -117,7 +117,7 @@ void Chain::push_viewedge_front(ViewEdge *iViewEdge, bool orientation)
}
// Ensure the continuity of underlying FEdges
CurvePoint *cp =
- _Vertices.front(); // assumed to be instantiated as new CurvePoint(iSVertex, 0, 0.f);
+ _Vertices.front(); // assumed to be instantiated as new CurvePoint(iSVertex, 0, 0.0f);
SVertex *sv_last = cp->A();
SVertex *sv_curr = (*v);
FEdge *fe = (orientation) ? iViewEdge->fedgeA() : iViewEdge->fedgeB();
diff --git a/source/blender/freestyle/intern/stroke/Operators.cpp b/source/blender/freestyle/intern/stroke/Operators.cpp
index 25954c7ecbf..05dbbb1304e 100644
--- a/source/blender/freestyle/intern/stroke/Operators.cpp
+++ b/source/blender/freestyle/intern/stroke/Operators.cpp
@@ -885,7 +885,7 @@ static int __recursiveSplit(Chain *_curve,
#endif
real _min = FLT_MAX;
++it;
- real mean = 0.f;
+ real mean = 0.0f;
// soc unused - real variance = 0.0f;
unsigned count = 0;
CurveInternal::CurvePointIterator next = it;
diff --git a/source/blender/freestyle/intern/stroke/Stroke.cpp b/source/blender/freestyle/intern/stroke/Stroke.cpp
index aa87dc473e2..e74a676ec79 100644
--- a/source/blender/freestyle/intern/stroke/Stroke.cpp
+++ b/source/blender/freestyle/intern/stroke/Stroke.cpp
@@ -691,7 +691,7 @@ int Stroke::Resample(float iSampling)
++next;
}
// add last:
- if ((it != itend) && (next == itend) /* && (t == 0.f)*/) {
+ if ((it != itend) && (next == itend) /* && (t == 0.0f)*/) {
newVertices.push_back(&(*it));
}
diff --git a/source/blender/gpu/intern/gpu_immediate_util.c b/source/blender/gpu/intern/gpu_immediate_util.c
index b8cd9fe356d..d18dc862ce7 100644
--- a/source/blender/gpu/intern/gpu_immediate_util.c
+++ b/source/blender/gpu/intern/gpu_immediate_util.c
@@ -455,8 +455,8 @@ void imm_draw_cylinder_fill_normal_3d(
for (int j = 0; j < stacks; j++) {
float fac1 = (float)j / (float)stacks;
float fac2 = (float)(j + 1) / (float)stacks;
- float r1 = base * (1.f - fac1) + top * fac1;
- float r2 = base * (1.f - fac2) + top * fac2;
+ float r1 = base * (1.0f - fac1) + top * fac1;
+ float r2 = base * (1.0f - fac2) + top * fac2;
float h1 = height * ((float)j / (float)stacks);
float h2 = height * ((float)(j + 1) / (float)stacks);
@@ -511,8 +511,8 @@ void imm_draw_cylinder_wire_3d(
for (int j = 0; j < stacks; j++) {
float fac1 = (float)j / (float)stacks;
float fac2 = (float)(j + 1) / (float)stacks;
- float r1 = base * (1.f - fac1) + top * fac1;
- float r2 = base * (1.f - fac2) + top * fac2;
+ float r1 = base * (1.0f - fac1) + top * fac1;
+ float r2 = base * (1.0f - fac2) + top * fac2;
float h1 = height * ((float)j / (float)stacks);
float h2 = height * ((float)(j + 1) / (float)stacks);
@@ -549,8 +549,8 @@ void imm_draw_cylinder_fill_3d(
for (int j = 0; j < stacks; j++) {
float fac1 = (float)j / (float)stacks;
float fac2 = (float)(j + 1) / (float)stacks;
- float r1 = base * (1.f - fac1) + top * fac1;
- float r2 = base * (1.f - fac2) + top * fac2;
+ float r1 = base * (1.0f - fac1) + top * fac1;
+ float r2 = base * (1.0f - fac2) + top * fac2;
float h1 = height * ((float)j / (float)stacks);
float h2 = height * ((float)(j + 1) / (float)stacks);
diff --git a/source/blender/ikplugin/intern/itasc_plugin.cpp b/source/blender/ikplugin/intern/itasc_plugin.cpp
index e127e377858..3efb78fe1ca 100644
--- a/source/blender/ikplugin/intern/itasc_plugin.cpp
+++ b/source/blender/ikplugin/intern/itasc_plugin.cpp
@@ -965,18 +965,18 @@ static int convert_channels(struct Depsgraph *depsgraph,
/* set DoF flag */
flag = 0;
if (!(pchan->ikflag & BONE_IK_NO_XDOF) && !(pchan->ikflag & BONE_IK_NO_XDOF_TEMP) &&
- (!(pchan->ikflag & BONE_IK_XLIMIT) || pchan->limitmin[0] < 0.f ||
- pchan->limitmax[0] > 0.f)) {
+ (!(pchan->ikflag & BONE_IK_XLIMIT) || pchan->limitmin[0] < 0.0f ||
+ pchan->limitmax[0] > 0.0f)) {
flag |= IK_XDOF;
}
if (!(pchan->ikflag & BONE_IK_NO_YDOF) && !(pchan->ikflag & BONE_IK_NO_YDOF_TEMP) &&
- (!(pchan->ikflag & BONE_IK_YLIMIT) || pchan->limitmin[1] < 0.f ||
- pchan->limitmax[1] > 0.f)) {
+ (!(pchan->ikflag & BONE_IK_YLIMIT) || pchan->limitmin[1] < 0.0f ||
+ pchan->limitmax[1] > 0.0f)) {
flag |= IK_YDOF;
}
if (!(pchan->ikflag & BONE_IK_NO_ZDOF) && !(pchan->ikflag & BONE_IK_NO_ZDOF_TEMP) &&
- (!(pchan->ikflag & BONE_IK_ZLIMIT) || pchan->limitmin[2] < 0.f ||
- pchan->limitmax[2] > 0.f)) {
+ (!(pchan->ikflag & BONE_IK_ZLIMIT) || pchan->limitmin[2] < 0.0f ||
+ pchan->limitmax[2] > 0.0f)) {
flag |= IK_ZDOF;
}
@@ -1535,7 +1535,7 @@ static IK_Scene *convert_tree(
/* add the end effector
* estimate the average bone length, used to clamp feedback error */
- for (bonecnt = 0, bonelen = 0.f, a = iktarget->channel; a >= 0;
+ for (bonecnt = 0, bonelen = 0.0f, a = iktarget->channel; a >= 0;
a = tree->parent[a], bonecnt++) {
bonelen += ikscene->blScale * tree->pchan[a]->bone->length;
}
diff --git a/source/blender/imbuf/intern/radiance_hdr.c b/source/blender/imbuf/intern/radiance_hdr.c
index 3dd26e1f7a2..4cd44a25cb8 100644
--- a/source/blender/imbuf/intern/radiance_hdr.c
+++ b/source/blender/imbuf/intern/radiance_hdr.c
@@ -329,9 +329,9 @@ static int fwritecolrs(
fcol[BLU] = (channels >= 3) ? fpscan[j + 2] : fpscan[j];
}
else {
- fcol[RED] = (float)ibufscan[j] / 255.f;
- fcol[GRN] = (float)((channels >= 2) ? ibufscan[j + 1] : ibufscan[j]) / 255.f;
- fcol[BLU] = (float)((channels >= 3) ? ibufscan[j + 2] : ibufscan[j]) / 255.f;
+ fcol[RED] = (float)ibufscan[j] / 255.0f;
+ fcol[GRN] = (float)((channels >= 2) ? ibufscan[j + 1] : ibufscan[j]) / 255.0f;
+ fcol[BLU] = (float)((channels >= 3) ? ibufscan[j + 2] : ibufscan[j]) / 255.0f;
}
FLOAT2RGBE(fcol, rgbe);
COPY_RGBE(rgbe, rgbe_scan[i]);
diff --git a/source/blender/io/alembic/exporter/abc_export_capi.cc b/source/blender/io/alembic/exporter/abc_export_capi.cc
index 892109dc578..7663d1790b6 100644
--- a/source/blender/io/alembic/exporter/abc_export_capi.cc
+++ b/source/blender/io/alembic/exporter/abc_export_capi.cc
@@ -236,7 +236,7 @@ bool ABC_export(Scene *scene,
else {
/* Fake a job context, so that we don't need NULL pointer checks while exporting. */
short stop = 0, do_update = 0;
- float progress = 0.f;
+ float progress = 0.0f;
blender::io::alembic::export_startjob(job, &stop, &do_update, &progress);
blender::io::alembic::export_endjob(job);
diff --git a/source/blender/io/alembic/intern/alembic_capi.cc b/source/blender/io/alembic/intern/alembic_capi.cc
index eba7f64db02..026a11ca25e 100644
--- a/source/blender/io/alembic/intern/alembic_capi.cc
+++ b/source/blender/io/alembic/intern/alembic_capi.cc
@@ -709,7 +709,7 @@ bool ABC_import(bContext *C,
else {
/* Fake a job context, so that we don't need NULL pointer checks while importing. */
short stop = 0, do_update = 0;
- float progress = 0.f;
+ float progress = 0.0f;
import_startjob(job, &stop, &do_update, &progress);
import_endjob(job);
diff --git a/source/blender/io/alembic/tests/abc_matrix_test.cc b/source/blender/io/alembic/tests/abc_matrix_test.cc
index fc5b645987e..c6d7245a52c 100644
--- a/source/blender/io/alembic/tests/abc_matrix_test.cc
+++ b/source/blender/io/alembic/tests/abc_matrix_test.cc
@@ -14,7 +14,7 @@ TEST(abc_matrix, CreateRotationMatrixY_YfromZ)
float rot_x_mat[3][3];
float rot_y_mat[3][3];
float rot_z_mat[3][3];
- float euler[3] = {0.f, M_PI_4, 0.f};
+ float euler[3] = {0.0f, M_PI_4, 0.0f};
/* Construct expected matrices */
float unit[3][3];
@@ -41,7 +41,7 @@ TEST(abc_matrix, CreateRotationMatrixZ_YfromZ)
float rot_x_mat[3][3];
float rot_y_mat[3][3];
float rot_z_mat[3][3];
- float euler[3] = {0.f, 0.f, M_PI_4};
+ float euler[3] = {0.0f, 0.0f, M_PI_4};
/* Construct expected matrices */
float unit[3][3];
@@ -150,25 +150,25 @@ TEST(abc_matrix, CopyM44AxisSwap_YfromZ)
* above. This matrix was created by rotating a cube in Blender over
* (X=10, Y=20, Z=30 degrees in XYZ order) and translating over (1, 2, 3) */
float input[4][4] = {
- {0.81379765272f, 0.4698463380336f, -0.342020124197f, 0.f},
- {-0.44096961617f, 0.8825641274452f, 0.163175910711f, 0.f},
- {0.37852230668f, 0.0180283170193f, 0.925416588783f, 0.f},
- {1.f, 2.f, 3.f, 1.f},
+ {0.81379765272f, 0.4698463380336f, -0.342020124197f, 0.0f},
+ {-0.44096961617f, 0.8825641274452f, 0.163175910711f, 0.0f},
+ {0.37852230668f, 0.0180283170193f, 0.925416588783f, 0.0f},
+ {1.0f, 2.0f, 3.0f, 1.0f},
};
copy_m44_axis_swap(result, input, ABC_YUP_FROM_ZUP);
/* Check the resulting rotation & translation. */
- float trans[4] = {1.f, 3.f, -2.f, 1.f};
+ float trans[4] = {1.0f, 3.0f, -2.0f, 1.0f};
EXPECT_V4_NEAR(trans, result[3], 1e-5f);
/* This matrix was created by rotating a cube in Blender over
* (X=10, Y=30, Z=-20 degrees in XZY order) and translating over (1, 3, -2) */
float expect[4][4] = {
- {0.813797652721f, -0.342020124197f, -0.469846338033f, 0.f},
- {0.378522306680f, 0.925416588783f, -0.018028317019f, 0.f},
- {0.440969616174f, -0.163175910711f, 0.882564127445f, 0.f},
- {1.f, 3.f, -2.f, 1.f},
+ {0.813797652721f, -0.342020124197f, -0.469846338033f, 0.0f},
+ {0.378522306680f, 0.925416588783f, -0.018028317019f, 0.0f},
+ {0.440969616174f, -0.163175910711f, 0.882564127445f, 0.0f},
+ {1.0f, 3.0f, -2.0f, 1.0f},
};
EXPECT_M4_NEAR(expect, result, 1e-5f);
}
@@ -182,10 +182,10 @@ TEST(abc_matrix, CopyM44AxisSwapWithScale_YfromZ)
* (X=10, Y=20, Z=30 degrees in XYZ order), translating over (1, 2, 3),
* and scaling by (4, 5, 6). */
float input[4][4] = {
- {3.25519061088f, 1.8793853521347f, -1.368080496788f, 0.f},
- {-2.20484805107f, 4.4128208160400f, 0.815879583358f, 0.f},
- {2.27113389968f, 0.1081698983907f, 5.552499771118f, 0.f},
- {1.f, 2.f, 3.f, 1.f},
+ {3.25519061088f, 1.8793853521347f, -1.368080496788f, 0.0f},
+ {-2.20484805107f, 4.4128208160400f, 0.815879583358f, 0.0f},
+ {2.27113389968f, 0.1081698983907f, 5.552499771118f, 0.0f},
+ {1.0f, 2.0f, 3.0f, 1.0f},
};
copy_m44_axis_swap(result, input, ABC_YUP_FROM_ZUP);
@@ -194,10 +194,10 @@ TEST(abc_matrix, CopyM44AxisSwapWithScale_YfromZ)
* (X=10, Y=30, Z=-20 degrees in XZY order), translating over (1, 3, -2)
* and scaling over (4, 6, 5). */
float expect[4][4] = {
- {3.255190610885f, -1.368080496788f, -1.879385352134f, 0.f},
- {2.271133899688f, 5.552499771118f, -0.108169898390f, 0.f},
- {2.204848051071f, -0.815879583358f, 4.412820816040f, 0.f},
- {1.f, 3.f, -2.f, 1.f},
+ {3.255190610885f, -1.368080496788f, -1.879385352134f, 0.0f},
+ {2.271133899688f, 5.552499771118f, -0.108169898390f, 0.0f},
+ {2.204848051071f, -0.815879583358f, 4.412820816040f, 0.0f},
+ {1.0f, 3.0f, -2.0f, 1.0f},
};
EXPECT_M4_NEAR(expect, result, 1e-5f);
}
@@ -209,10 +209,10 @@ TEST(abc_matrix, CopyM44AxisSwap_ZfromY)
/* This matrix was created by rotating a cube in Blender over
* (X=10, Y=30, Z=-20 degrees in XZY order) and translating over (1, 3, -2) */
float input[4][4] = {
- {0.813797652721f, -0.342020124197f, -0.469846338033f, 0.f},
- {0.378522306680f, 0.925416588783f, -0.018028317019f, 0.f},
- {0.440969616174f, -0.163175910711f, 0.882564127445f, 0.f},
- {1.f, 3.f, -2.f, 1.f},
+ {0.813797652721f, -0.342020124197f, -0.469846338033f, 0.0f},
+ {0.378522306680f, 0.925416588783f, -0.018028317019f, 0.0f},
+ {0.440969616174f, -0.163175910711f, 0.882564127445f, 0.0f},
+ {1.0f, 3.0f, -2.0f, 1.0f},
};
copy_m44_axis_swap(result, input, ABC_ZUP_FROM_YUP);
@@ -220,10 +220,10 @@ TEST(abc_matrix, CopyM44AxisSwap_ZfromY)
/* This matrix was created by rotating a cube in Blender over
* (X=10, Y=20, Z=30 degrees in XYZ order) and translating over (1, 2, 3) */
float expect[4][4] = {
- {0.813797652721f, 0.469846338033f, -0.342020124197f, 0.f},
- {-0.44096961617f, 0.882564127445f, 0.163175910711f, 0.f},
- {0.378522306680f, 0.018028317019f, 0.925416588783f, 0.f},
- {1.f, 2.f, 3.f, 1.f},
+ {0.813797652721f, 0.469846338033f, -0.342020124197f, 0.0f},
+ {-0.44096961617f, 0.882564127445f, 0.163175910711f, 0.0f},
+ {0.378522306680f, 0.018028317019f, 0.925416588783f, 0.0f},
+ {1.0f, 2.0f, 3.0f, 1.0f},
};
EXPECT_M4_NEAR(expect, result, 1e-5f);
@@ -237,10 +237,10 @@ TEST(abc_matrix, CopyM44AxisSwapWithScale_ZfromY)
* (X=10, Y=30, Z=-20 degrees in XZY order), translating over (1, 3, -2)
* and scaling over (4, 6, 5). */
float input[4][4] = {
- {3.2551906108f, -1.36808049678f, -1.879385352134f, 0.f},
- {2.2711338996f, 5.55249977111f, -0.108169898390f, 0.f},
- {2.2048480510f, -0.81587958335f, 4.412820816040f, 0.f},
- {1.f, 3.f, -2.f, 1.f},
+ {3.2551906108f, -1.36808049678f, -1.879385352134f, 0.0f},
+ {2.2711338996f, 5.55249977111f, -0.108169898390f, 0.0f},
+ {2.2048480510f, -0.81587958335f, 4.412820816040f, 0.0f},
+ {1.0f, 3.0f, -2.0f, 1.0f},
};
copy_m44_axis_swap(result, input, ABC_ZUP_FROM_YUP);
@@ -249,10 +249,10 @@ TEST(abc_matrix, CopyM44AxisSwapWithScale_ZfromY)
* (X=10, Y=20, Z=30 degrees in XYZ order), translating over (1, 2, 3),
* and scaling by (4, 5, 6). */
float expect[4][4] = {
- {3.25519061088f, 1.879385352134f, -1.36808049678f, 0.f},
- {-2.2048480510f, 4.412820816040f, 0.81587958335f, 0.f},
- {2.27113389968f, 0.108169898390f, 5.55249977111f, 0.f},
- {1.f, 2.f, 3.f, 1.f},
+ {3.25519061088f, 1.879385352134f, -1.36808049678f, 0.0f},
+ {-2.2048480510f, 4.412820816040f, 0.81587958335f, 0.0f},
+ {2.27113389968f, 0.108169898390f, 5.55249977111f, 0.0f},
+ {1.0f, 2.0f, 3.0f, 1.0f},
};
EXPECT_M4_NEAR(expect, result, 1e-5f);
diff --git a/source/blender/io/usd/intern/usd_capi.cc b/source/blender/io/usd/intern/usd_capi.cc
index 7b375689543..12fc04e2142 100644
--- a/source/blender/io/usd/intern/usd_capi.cc
+++ b/source/blender/io/usd/intern/usd_capi.cc
@@ -225,7 +225,7 @@ bool USD_export(bContext *C,
else {
/* Fake a job context, so that we don't need NULL pointer checks while exporting. */
short stop = 0, do_update = 0;
- float progress = 0.f;
+ float progress = 0.0f;
blender::io::usd::export_startjob(job, &stop, &do_update, &progress);
blender::io::usd::export_endjob(job);
diff --git a/source/blender/io/usd/intern/usd_writer_light.cc b/source/blender/io/usd/intern/usd_writer_light.cc
index b6a81c973d2..f77c51c22ec 100644
--- a/source/blender/io/usd/intern/usd_writer_light.cc
+++ b/source/blender/io/usd/intern/usd_writer_light.cc
@@ -99,7 +99,7 @@ void USDLightWriter::do_write(HierarchyContext &context)
usd_intensity = light->energy;
}
else {
- usd_intensity = light->energy / 100.f;
+ usd_intensity = light->energy / 100.0f;
}
usd_light.CreateIntensityAttr().Set(usd_intensity, timecode);
diff --git a/source/blender/makesdna/DNA_camera_defaults.h b/source/blender/makesdna/DNA_camera_defaults.h
index 55fbb59a161..b0237caa544 100644
--- a/source/blender/makesdna/DNA_camera_defaults.h
+++ b/source/blender/makesdna/DNA_camera_defaults.h
@@ -37,7 +37,7 @@
#define _DNA_DEFAULT_CameraStereoSettings \
{ \
.interocular_distance = 0.065f, \
- .convergence_distance = 30.f * 0.065f, \
+ .convergence_distance = 30.0f * 0.065f, \
.pole_merge_angle_from = DEG2RADF(60.0f), \
.pole_merge_angle_to = DEG2RADF(75.0f), \
}
diff --git a/source/blender/makesrna/intern/rna_camera.c b/source/blender/makesrna/intern/rna_camera.c
index c6b2489f831..1810cee5cee 100644
--- a/source/blender/makesrna/intern/rna_camera.c
+++ b/source/blender/makesrna/intern/rna_camera.c
@@ -384,7 +384,7 @@ static void rna_def_camera_stereo_data(BlenderRNA *brna)
prop = RNA_def_property(srna, "convergence_distance", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_range(prop, 0.00001f, FLT_MAX);
- RNA_def_property_ui_range(prop, 0.00001f, 15.f, 1, 3);
+ RNA_def_property_ui_range(prop, 0.00001f, 15.0f, 1, 3);
RNA_def_property_ui_text(prop,
"Convergence Plane Distance",
"The converge point for the stereo cameras "
@@ -584,7 +584,7 @@ void RNA_def_camera(BlenderRNA *brna)
prop = RNA_def_property(srna, "sensor_width", PROP_FLOAT, PROP_DISTANCE_CAMERA);
RNA_def_property_float_sdna(prop, NULL, "sensor_x");
RNA_def_property_range(prop, 1.0f, FLT_MAX);
- RNA_def_property_ui_range(prop, 1.0f, 100.f, 100, 4);
+ RNA_def_property_ui_range(prop, 1.0f, 100.0f, 100, 4);
RNA_def_property_ui_text(
prop, "Sensor Width", "Horizontal size of the image sensor area in millimeters");
RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Camera_update");
@@ -592,7 +592,7 @@ void RNA_def_camera(BlenderRNA *brna)
prop = RNA_def_property(srna, "sensor_height", PROP_FLOAT, PROP_DISTANCE_CAMERA);
RNA_def_property_float_sdna(prop, NULL, "sensor_y");
RNA_def_property_range(prop, 1.0f, FLT_MAX);
- RNA_def_property_ui_range(prop, 1.0f, 100.f, 100, 4);
+ RNA_def_property_ui_range(prop, 1.0f, 100.0f, 100, 4);
RNA_def_property_ui_text(
prop, "Sensor Height", "Vertical size of the image sensor area in millimeters");
RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Camera_update");
diff --git a/source/blender/makesrna/intern/rna_constraint.c b/source/blender/makesrna/intern/rna_constraint.c
index eda59737f2b..774187d18b7 100644
--- a/source/blender/makesrna/intern/rna_constraint.c
+++ b/source/blender/makesrna/intern/rna_constraint.c
@@ -673,8 +673,8 @@ static void rna_ActionConstraint_minmax_range(
*max = 180.0f;
}
else {
- *min = -1000.f;
- *max = 1000.f;
+ *min = -1000.0f;
+ *max = 1000.0f;
}
}
@@ -1183,13 +1183,13 @@ static void rna_def_constraint_kinematic(BlenderRNA *brna)
RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_Constraint_update");
prop = RNA_def_property(srna, "weight", PROP_FLOAT, PROP_NONE);
- RNA_def_property_range(prop, 0.01, 1.f);
+ RNA_def_property_range(prop, 0.01, 1.0f);
RNA_def_property_ui_text(
prop, "Weight", "For Tree-IK: Weight of position control for this target");
prop = RNA_def_property(srna, "orient_weight", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "orientweight");
- RNA_def_property_range(prop, 0.01, 1.f);
+ RNA_def_property_range(prop, 0.01, 1.0f);
RNA_def_property_ui_text(
prop, "Orientation Weight", "For Tree-IK: Weight of orientation control for this target");
RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_Constraint_update");
@@ -1274,7 +1274,7 @@ static void rna_def_constraint_kinematic(BlenderRNA *brna)
prop = RNA_def_property(srna, "distance", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "dist");
- RNA_def_property_range(prop, 0.0, 100.f);
+ RNA_def_property_range(prop, 0.0, 100.0f);
RNA_def_property_ui_text(prop, "Distance", "Radius of limiting sphere");
RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_Constraint_update");
@@ -1790,21 +1790,21 @@ static void rna_def_constraint_action(BlenderRNA *brna)
prop = RNA_def_property(srna, "max", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "max");
- RNA_def_property_range(prop, -1000.f, 1000.f);
+ RNA_def_property_range(prop, -1000.0f, 1000.0f);
RNA_def_property_ui_text(prop, "Maximum", "Maximum value for target channel range");
RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_Constraint_update");
RNA_def_property_float_funcs(prop, NULL, NULL, "rna_ActionConstraint_minmax_range");
prop = RNA_def_property(srna, "min", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "min");
- RNA_def_property_range(prop, -1000.f, 1000.f);
+ RNA_def_property_range(prop, -1000.0f, 1000.0f);
RNA_def_property_ui_text(prop, "Minimum", "Minimum value for target channel range");
RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_Constraint_update");
RNA_def_property_float_funcs(prop, NULL, NULL, "rna_ActionConstraint_minmax_range");
prop = RNA_def_property(srna, "eval_time", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "eval_time");
- RNA_def_property_range(prop, 0.f, 1.f);
+ RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(
prop, "Evaluation Time", "Interpolates between Action Start and End frames");
RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_Constraint_update");
@@ -2003,7 +2003,7 @@ static void rna_def_constraint_stretch_to(BlenderRNA *brna)
RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_Constraint_update");
prop = RNA_def_property(srna, "bulge", PROP_FLOAT, PROP_NONE);
- RNA_def_property_range(prop, 0.0, 100.f);
+ RNA_def_property_range(prop, 0.0, 100.0f);
RNA_def_property_ui_text(
prop, "Volume Variation", "Factor between volume variation and stretching");
RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_Constraint_update");
@@ -2546,37 +2546,37 @@ static void rna_def_constraint_rotation_limit(BlenderRNA *brna)
prop = RNA_def_property(srna, "min_x", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "xmin");
- RNA_def_property_range(prop, -1000.0, 1000.f);
+ RNA_def_property_range(prop, -1000.0, 1000.0f);
RNA_def_property_ui_text(prop, "Minimum X", "Lowest X value to allow");
RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_Constraint_update");
prop = RNA_def_property(srna, "min_y", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "ymin");
- RNA_def_property_range(prop, -1000.0, 1000.f);
+ RNA_def_property_range(prop, -1000.0, 1000.0f);
RNA_def_property_ui_text(prop, "Minimum Y", "Lowest Y value to allow");
RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_Constraint_update");
prop = RNA_def_property(srna, "min_z", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "zmin");
- RNA_def_property_range(prop, -1000.0, 1000.f);
+ RNA_def_property_range(prop, -1000.0, 1000.0f);
RNA_def_property_ui_text(prop, "Minimum Z", "Lowest Z value to allow");
RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_Constraint_update");
prop = RNA_def_property(srna, "max_x", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "xmax");
- RNA_def_property_range(prop, -1000.0, 1000.f);
+ RNA_def_property_range(prop, -1000.0, 1000.0f);
RNA_def_property_ui_text(prop, "Maximum X", "Highest X value to allow");
RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_Constraint_update");
prop = RNA_def_property(srna, "max_y", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "ymax");
- RNA_def_property_range(prop, -1000.0, 1000.f);
+ RNA_def_property_range(prop, -1000.0, 1000.0f);
RNA_def_property_ui_text(prop, "Maximum Y", "Highest Y value to allow");
RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_Constraint_update");
prop = RNA_def_property(srna, "max_z", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "zmax");
- RNA_def_property_range(prop, -1000.0, 1000.f);
+ RNA_def_property_range(prop, -1000.0, 1000.0f);
RNA_def_property_ui_text(prop, "Maximum Z", "Highest Z value to allow");
RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_Constraint_update");
@@ -2634,37 +2634,37 @@ static void rna_def_constraint_size_limit(BlenderRNA *brna)
prop = RNA_def_property(srna, "min_x", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "xmin");
- RNA_def_property_range(prop, -1000.0, 1000.f);
+ RNA_def_property_range(prop, -1000.0, 1000.0f);
RNA_def_property_ui_text(prop, "Minimum X", "Lowest X value to allow");
RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_Constraint_update");
prop = RNA_def_property(srna, "min_y", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ymin");
- RNA_def_property_range(prop, -1000.0, 1000.f);
+ RNA_def_property_range(prop, -1000.0, 1000.0f);
RNA_def_property_ui_text(prop, "Minimum Y", "Lowest Y value to allow");
RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_Constraint_update");
prop = RNA_def_property(srna, "min_z", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "zmin");
- RNA_def_property_range(prop, -1000.0, 1000.f);
+ RNA_def_property_range(prop, -1000.0, 1000.0f);
RNA_def_property_ui_text(prop, "Minimum Z", "Lowest Z value to allow");
RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_Constraint_update");
prop = RNA_def_property(srna, "max_x", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "xmax");
- RNA_def_property_range(prop, -1000.0, 1000.f);
+ RNA_def_property_range(prop, -1000.0, 1000.0f);
RNA_def_property_ui_text(prop, "Maximum X", "Highest X value to allow");
RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_Constraint_update");
prop = RNA_def_property(srna, "max_y", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ymax");
- RNA_def_property_range(prop, -1000.0, 1000.f);
+ RNA_def_property_range(prop, -1000.0, 1000.0f);
RNA_def_property_ui_text(prop, "Maximum Y", "Highest Y value to allow");
RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_Constraint_update");
prop = RNA_def_property(srna, "max_z", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "zmax");
- RNA_def_property_range(prop, -1000.0, 1000.f);
+ RNA_def_property_range(prop, -1000.0, 1000.0f);
RNA_def_property_ui_text(prop, "Maximum Z", "Highest Z value to allow");
RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_Constraint_update");
@@ -3017,7 +3017,7 @@ static void rna_def_constraint_spline_ik(BlenderRNA *brna)
/* volume presevation for "volumetric" scale mode */
prop = RNA_def_property(srna, "bulge", PROP_FLOAT, PROP_NONE);
- RNA_def_property_range(prop, 0.0, 100.f);
+ RNA_def_property_range(prop, 0.0, 100.0f);
RNA_def_property_ui_text(
prop, "Volume Variation", "Factor between volume variation and stretching");
RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_Constraint_update");
diff --git a/source/blender/makesrna/intern/rna_image.c b/source/blender/makesrna/intern/rna_image.c
index 1c43815d3a2..ea36289d361 100644
--- a/source/blender/makesrna/intern/rna_image.c
+++ b/source/blender/makesrna/intern/rna_image.c
@@ -1034,7 +1034,7 @@ static void rna_def_image(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "aspx");
RNA_def_property_array(prop, 2);
RNA_def_property_range(prop, 0.1f, FLT_MAX);
- RNA_def_property_ui_range(prop, 0.1f, 5000.f, 1, 2);
+ RNA_def_property_ui_range(prop, 0.1f, 5000.0f, 1, 2);
RNA_def_property_ui_text(
prop, "Display Aspect", "Display Aspect for this image, does not affect rendering");
RNA_def_property_update(prop, NC_IMAGE | ND_DISPLAY, NULL);
diff --git a/source/blender/makesrna/intern/rna_linestyle.c b/source/blender/makesrna/intern/rna_linestyle.c
index 64c50b82d1f..03442748854 100644
--- a/source/blender/makesrna/intern/rna_linestyle.c
+++ b/source/blender/makesrna/intern/rna_linestyle.c
@@ -1573,7 +1573,7 @@ static void rna_def_linestyle_modifiers(BlenderRNA *brna)
prop = RNA_def_property(srna, "pivot_u", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "pivot_u");
- RNA_def_property_range(prop, 0.f, 1.f);
+ RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop,
"Stroke Point Parameter",
"Pivot in terms of the stroke point parameter u (0 <= u <= 1)");
@@ -1920,7 +1920,7 @@ static void rna_def_linestyle(BlenderRNA *brna)
prop = RNA_def_property(srna, "thickness_ratio", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "thickness_ratio");
- RNA_def_property_range(prop, 0.f, 1.f);
+ RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(
prop,
"Thickness Ratio",
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c
index bc13601879f..6ac3f1dd424 100644
--- a/source/blender/makesrna/intern/rna_nodetree.c
+++ b/source/blender/makesrna/intern/rna_nodetree.c
@@ -7118,7 +7118,7 @@ static void def_cmp_lensdist(StructRNA *srna)
static void def_cmp_colorbalance(StructRNA *srna)
{
PropertyRNA *prop;
- static float default_1[3] = {1.f, 1.f, 1.f};
+ static float default_1[3] = {1.0f, 1.0f, 1.0f};
static const EnumPropertyItem type_items[] = {
{0, "LIFT_GAMMA_GAIN", 0, "Lift/Gamma/Gain", ""},
@@ -7173,7 +7173,7 @@ static void def_cmp_colorbalance(StructRNA *srna)
RNA_def_property_float_sdna(prop, NULL, "power");
RNA_def_property_array(prop, 3);
RNA_def_property_float_array_default(prop, default_1);
- RNA_def_property_range(prop, 0.f, FLT_MAX);
+ RNA_def_property_range(prop, 0.0f, FLT_MAX);
RNA_def_property_ui_range(prop, 0, 2, 0.1, 3);
RNA_def_property_ui_text(prop, "Power", "Correction for Midtones");
RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_NodeColorBalance_update_cdl");
@@ -7182,7 +7182,7 @@ static void def_cmp_colorbalance(StructRNA *srna)
RNA_def_property_float_sdna(prop, NULL, "slope");
RNA_def_property_array(prop, 3);
RNA_def_property_float_array_default(prop, default_1);
- RNA_def_property_range(prop, 0.f, FLT_MAX);
+ RNA_def_property_range(prop, 0.0f, FLT_MAX);
RNA_def_property_ui_range(prop, 0, 2, 0.1, 3);
RNA_def_property_ui_text(prop, "Slope", "Correction for Highlights");
RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_NodeColorBalance_update_cdl");
@@ -8065,7 +8065,7 @@ static void def_cmp_sunbeams(StructRNA *srna)
static void def_cmp_cryptomatte(StructRNA *srna)
{
PropertyRNA *prop;
- static float default_1[3] = {1.f, 1.f, 1.f};
+ static float default_1[3] = {1.0f, 1.0f, 1.0f};
RNA_def_struct_sdna_from(srna, "NodeCryptomatte", "storage");
prop = RNA_def_property(srna, "matte_id", PROP_STRING, PROP_NONE);
diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c
index 543038eee8c..5987f52328d 100644
--- a/source/blender/makesrna/intern/rna_particle.c
+++ b/source/blender/makesrna/intern/rna_particle.c
@@ -1011,13 +1011,13 @@ static float rna_PartSettings_timestep_get(struct PointerRNA *ptr)
static void rna_PartSetting_hairlength_set(struct PointerRNA *ptr, float value)
{
ParticleSettings *settings = (ParticleSettings *)ptr->data;
- settings->normfac = value / 4.f;
+ settings->normfac = value / 4.0f;
}
static float rna_PartSetting_hairlength_get(struct PointerRNA *ptr)
{
ParticleSettings *settings = (ParticleSettings *)ptr->data;
- return settings->normfac * 4.f;
+ return settings->normfac * 4.0f;
}
static void rna_PartSetting_linelentail_set(struct PointerRNA *ptr, float value)
diff --git a/source/blender/makesrna/intern/rna_pose.c b/source/blender/makesrna/intern/rna_pose.c
index 9698ee02166..bc9aabbefe6 100644
--- a/source/blender/makesrna/intern/rna_pose.c
+++ b/source/blender/makesrna/intern/rna_pose.c
@@ -375,14 +375,14 @@ static void rna_Itasc_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerR
if (itasc->feedback < 0.01f) {
itasc->feedback = 0.01f;
}
- if (itasc->feedback > 100.f) {
- itasc->feedback = 100.f;
+ if (itasc->feedback > 100.0f) {
+ itasc->feedback = 100.0f;
}
if (itasc->maxvel < 0.01f) {
itasc->maxvel = 0.01f;
}
- if (itasc->maxvel > 100.f) {
- itasc->maxvel = 100.f;
+ if (itasc->maxvel > 100.0f) {
+ itasc->maxvel = 100.0f;
}
BIK_update_param(ob->pose);
@@ -1504,7 +1504,7 @@ static void rna_def_pose_itasc(BlenderRNA *brna)
prop = RNA_def_property(srna, "step_count", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "numstep");
- RNA_def_property_range(prop, 1.f, 50.f);
+ RNA_def_property_range(prop, 1.0f, 50.0f);
RNA_def_property_ui_text(prop, "Num Steps", "Divide the frame interval into this many steps");
RNA_def_property_update(prop, NC_OBJECT | ND_POSE, "rna_Itasc_update");
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index 6a6cf2f8fc9..b5b538033f7 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -6539,7 +6539,7 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
prop = RNA_def_property(srna, "line_thickness", PROP_FLOAT, PROP_PIXEL);
RNA_def_property_float_sdna(prop, NULL, "unit_line_thickness");
- RNA_def_property_range(prop, 0.f, 10000.f);
+ RNA_def_property_range(prop, 0.0f, 10000.0f);
RNA_def_property_ui_text(prop, "Line Thickness", "Line thickness in pixels");
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index 605d5c97d72..e0ee33bd234 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -2347,8 +2347,8 @@ static void rna_SpaceClipEditor_lock_selection_update(Main *UNUSED(bmain),
{
SpaceClip *sc = (SpaceClip *)(ptr->data);
- sc->xlockof = 0.f;
- sc->ylockof = 0.f;
+ sc->xlockof = 0.0f;
+ sc->ylockof = 0.0f;
}
static void rna_SpaceClipEditor_view_type_update(Main *UNUSED(bmain),
diff --git a/source/blender/makesrna/intern/rna_tracking.c b/source/blender/makesrna/intern/rna_tracking.c
index effea4d5c8f..f9597fdd7af 100644
--- a/source/blender/makesrna/intern/rna_tracking.c
+++ b/source/blender/makesrna/intern/rna_tracking.c
@@ -1186,7 +1186,7 @@ static void rna_def_trackingCamera(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "focal");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_range(prop, 0.0f, FLT_MAX);
- RNA_def_property_ui_range(prop, 0.0f, 5000.f, 1, 2);
+ RNA_def_property_ui_range(prop, 0.0f, 5000.0f, 1, 2);
RNA_def_property_ui_text(prop, "Focal Length", "Camera's focal length");
RNA_def_property_update(prop, NC_MOVIECLIP | NA_EDITED, NULL);
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index f0106c3729b..932aa260bd5 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -4223,7 +4223,7 @@ static void rna_def_userdef_solidlight(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
- static float default_dir[3] = {0.f, 0.f, 1.f};
+ static float default_dir[3] = {0.0f, 0.0f, 1.0f};
static float default_col[3] = {0.8f, 0.8f, 0.8f};
srna = RNA_def_struct(brna, "UserSolidLight", NULL);
@@ -4284,26 +4284,26 @@ static void rna_def_userdef_walk_navigation(BlenderRNA *brna)
"Speed factor for when looking around, high values mean faster mouse movement");
prop = RNA_def_property(srna, "walk_speed", PROP_FLOAT, PROP_VELOCITY);
- RNA_def_property_range(prop, 0.01f, 100.f);
+ RNA_def_property_range(prop, 0.01f, 100.0f);
RNA_def_property_ui_text(prop, "Walk Speed", "Base speed for walking and flying");
prop = RNA_def_property(srna, "walk_speed_factor", PROP_FLOAT, PROP_NONE);
- RNA_def_property_range(prop, 0.01f, 10.f);
+ RNA_def_property_range(prop, 0.01f, 10.0f);
RNA_def_property_ui_text(
prop, "Speed Factor", "Multiplication factor when using the fast or slow modifiers");
prop = RNA_def_property(srna, "view_height", PROP_FLOAT, PROP_UNIT_LENGTH);
- RNA_def_property_ui_range(prop, 0.1f, 10.f, 0.1, 2);
- RNA_def_property_range(prop, 0.f, 1000.f);
+ RNA_def_property_ui_range(prop, 0.1f, 10.0f, 0.1, 2);
+ RNA_def_property_range(prop, 0.0f, 1000.0f);
RNA_def_property_ui_text(prop, "View Height", "View distance from the floor when walking");
prop = RNA_def_property(srna, "jump_height", PROP_FLOAT, PROP_UNIT_LENGTH);
- RNA_def_property_ui_range(prop, 0.1f, 10.f, 0.1, 2);
- RNA_def_property_range(prop, 0.1f, 100.f);
+ RNA_def_property_ui_range(prop, 0.1f, 10.0f, 0.1, 2);
+ RNA_def_property_range(prop, 0.1f, 100.0f);
RNA_def_property_ui_text(prop, "Jump Height", "Maximum height of a jump");
prop = RNA_def_property(srna, "teleport_time", PROP_FLOAT, PROP_NONE);
- RNA_def_property_range(prop, 0.f, 10.f);
+ RNA_def_property_range(prop, 0.0f, 10.0f);
RNA_def_property_ui_text(
prop, "Teleport Duration", "Interval of time warp when teleporting in navigation mode");
diff --git a/source/blender/nodes/composite/nodes/node_composite_defocus.c b/source/blender/nodes/composite/nodes/node_composite_defocus.c
index bd8aca3d2fd..3803f450f49 100644
--- a/source/blender/nodes/composite/nodes/node_composite_defocus.c
+++ b/source/blender/nodes/composite/nodes/node_composite_defocus.c
@@ -45,10 +45,10 @@ static void node_composit_init_defocus(bNodeTree *UNUSED(ntree), bNode *node)
nbd->preview = 1;
nbd->gamco = 0;
nbd->samples = 16;
- nbd->fstop = 128.f;
+ nbd->fstop = 128.0f;
nbd->maxblur = 16;
- nbd->bthresh = 1.f;
- nbd->scale = 1.f;
+ nbd->bthresh = 1.0f;
+ nbd->scale = 1.0f;
nbd->no_zbuf = 1;
node->storage = nbd;
}
diff --git a/source/blender/nodes/composite/nodes/node_composite_directionalblur.c b/source/blender/nodes/composite/nodes/node_composite_directionalblur.c
index 477bc43d084..6dd60526edf 100644
--- a/source/blender/nodes/composite/nodes/node_composite_directionalblur.c
+++ b/source/blender/nodes/composite/nodes/node_composite_directionalblur.c
@@ -23,7 +23,7 @@
#include "node_composite_util.h"
-static bNodeSocketTemplate cmp_node_dblur_in[] = {{SOCK_RGBA, N_("Image"), 1.0f, 1.0f, 1.0f, 1.f},
+static bNodeSocketTemplate cmp_node_dblur_in[] = {{SOCK_RGBA, N_("Image"), 1.0f, 1.0f, 1.0f, 1.0f},
{-1, ""}};
static bNodeSocketTemplate cmp_node_dblur_out[] = {{SOCK_RGBA, N_("Image")}, {-1, ""}};
diff --git a/source/blender/nodes/composite/nodes/node_composite_lensdist.c b/source/blender/nodes/composite/nodes/node_composite_lensdist.c
index 89f61b59171..ce8c8c00e24 100644
--- a/source/blender/nodes/composite/nodes/node_composite_lensdist.c
+++ b/source/blender/nodes/composite/nodes/node_composite_lensdist.c
@@ -25,8 +25,8 @@
static bNodeSocketTemplate cmp_node_lensdist_in[] = {
{SOCK_RGBA, N_("Image"), 1.0f, 1.0f, 1.0f, 1.0f},
- {SOCK_FLOAT, N_("Distort"), 0.f, 0.f, 0.f, 0.f, -0.999f, 1.f, PROP_NONE},
- {SOCK_FLOAT, N_("Dispersion"), 0.f, 0.f, 0.f, 0.f, 0.f, 1.f, PROP_NONE},
+ {SOCK_FLOAT, N_("Distort"), 0.0f, 0.0f, 0.0f, 0.0f, -0.999f, 1.0f, PROP_NONE},
+ {SOCK_FLOAT, N_("Dispersion"), 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_NONE},
{-1, ""},
};
static bNodeSocketTemplate cmp_node_lensdist_out[] = {
diff --git a/source/blender/nodes/shader/nodes/node_shader_bsdf_hair_principled.c b/source/blender/nodes/shader/nodes/node_shader_bsdf_hair_principled.c
index 2f42b6429c7..e29b2ee1c5c 100644
--- a/source/blender/nodes/shader/nodes/node_shader_bsdf_hair_principled.c
+++ b/source/blender/nodes/shader/nodes/node_shader_bsdf_hair_principled.c
@@ -34,7 +34,7 @@ static bNodeSocketTemplate sh_node_bsdf_hair_principled_in[] = {
{SOCK_FLOAT, N_("IOR"), 1.55f, 0.0f, 0.0f, 0.0f, 0.0f, 1000.0f},
{SOCK_FLOAT,
N_("Offset"),
- 2.0f * ((float)M_PI) / 180.f,
+ 2.0f * ((float)M_PI) / 180.0f,
0.0f,
0.0f,
0.0f,
diff --git a/source/blender/python/mathutils/mathutils_noise.c b/source/blender/python/mathutils/mathutils_noise.c
index 05cd7a12706..c24960f2d04 100644
--- a/source/blender/python/mathutils/mathutils_noise.c
+++ b/source/blender/python/mathutils/mathutils_noise.c
@@ -179,7 +179,7 @@ static float frand(void)
y ^= (y << 15) & 0xefc60000UL;
y ^= (y >> 18);
- return (float)y / 4294967296.f;
+ return (float)y / 4294967296.0f;
}
/*------------------------------------------------------------*/
@@ -258,8 +258,8 @@ static float turb(
{
float amp, out, t;
int i;
- amp = 1.f;
- out = (float)(2.0f * BLI_noise_generic_noise(1.f, x, y, z, false, nb) - 1.0f);
+ amp = 1.0f;
+ out = (float)(2.0f * BLI_noise_generic_noise(1.0f, x, y, z, false, nb) - 1.0f);
if (hard) {
out = fabsf(out);
}
@@ -268,7 +268,7 @@ static float turb(
x *= freqscale;
y *= freqscale;
z *= freqscale;
- t = (float)(amp * (2.0f * BLI_noise_generic_noise(1.f, x, y, z, false, nb) - 1.0f));
+ t = (float)(amp * (2.0f * BLI_noise_generic_noise(1.0f, x, y, z, false, nb) - 1.0f));
if (hard) {
t = fabsf(t);
}
@@ -291,7 +291,7 @@ static void vTurb(float x,
{
float amp, t[3];
int i;
- amp = 1.f;
+ amp = 1.0f;
noise_vector(x, y, z, nb, v);
if (hard) {
v[0] = fabsf(v[0]);
diff --git a/source/blender/render/intern/source/imagetexture.c b/source/blender/render/intern/source/imagetexture.c
index dd179f9461b..4dc0235517b 100644
--- a/source/blender/render/intern/source/imagetexture.c
+++ b/source/blender/render/intern/source/imagetexture.c
@@ -282,9 +282,9 @@ int imagewrap(Tex *tex,
* the normal used in the renderer points inward. It is generated
* this way in calc_vertexnormals(). Should this ever change
* this negate must be removed. */
- texres->nor[0] = -2.f * (texres->tr - 0.5f);
- texres->nor[1] = 2.f * (texres->tg - 0.5f);
- texres->nor[2] = 2.f * (texres->tb - 0.5f);
+ texres->nor[0] = -2.0f * (texres->tr - 0.5f);
+ texres->nor[1] = 2.0f * (texres->tg - 0.5f);
+ texres->nor[2] = 2.0f * (texres->tb - 0.5f);
}
else {
/* bump: take three samples */
@@ -798,7 +798,7 @@ static int ibuf_get_color_clip(float col[4], ImBuf *ibuf, int x, int y, int extf
col[0] = fp[0];
col[1] = fp[1];
col[2] = fp[2];
- col[3] = clip ? 0.f : (ibuf->channels == 4 ? fp[3] : 1.f);
+ col[3] = clip ? 0.0f : (ibuf->channels == 4 ? fp[3] : 1.0f);
}
}
else {
@@ -807,7 +807,7 @@ static int ibuf_get_color_clip(float col[4], ImBuf *ibuf, int x, int y, int extf
col[0] = rect[0] * inv_alpha_fac;
col[1] = rect[1] * inv_alpha_fac;
col[2] = rect[2] * inv_alpha_fac;
- col[3] = clip ? 0.f : rect[3] * (1.f / 255.f);
+ col[3] = clip ? 0.0f : rect[3] * (1.0f / 255.0f);
}
return clip;
}
@@ -820,7 +820,7 @@ static int ibuf_get_color_clip_bilerp(
float c00[4], c01[4], c10[4], c11[4];
const float ufl = floorf(u -= 0.5f), vfl = floorf(v -= 0.5f);
const float uf = u - ufl, vf = v - vfl;
- const float w00 = (1.f - uf) * (1.f - vf), w10 = uf * (1.f - vf), w01 = (1.f - uf) * vf,
+ const float w00 = (1.0f - uf) * (1.0f - vf), w10 = uf * (1.0f - vf), w01 = (1.0f - uf) * vf,
w11 = uf * vf;
const int x1 = (int)ufl, y1 = (int)vfl, x2 = x1 + 1, y2 = y1 + 1;
int clip = ibuf_get_color_clip(c00, ibuf, x1, y1, extflag);
@@ -830,7 +830,7 @@ static int ibuf_get_color_clip_bilerp(
col[0] = w00 * c00[0] + w10 * c10[0] + w01 * c01[0] + w11 * c11[0];
col[1] = w00 * c00[1] + w10 * c10[1] + w01 * c01[1] + w11 * c11[1];
col[2] = w00 * c00[2] + w10 * c10[2] + w01 * c01[2] + w11 * c11[2];
- col[3] = clip ? 0.f : w00 * c00[3] + w10 * c10[3] + w01 * c01[3] + w11 * c11[3];
+ col[3] = clip ? 0.0f : w00 * c00[3] + w10 * c10[3] + w01 * c01[3] + w11 * c11[3];
return clip;
}
return ibuf_get_color_clip(col, ibuf, (int)u, (int)v, extflag);
@@ -839,7 +839,7 @@ static int ibuf_get_color_clip_bilerp(
static void area_sample(TexResult *texr, ImBuf *ibuf, float fx, float fy, afdata_t *AFD)
{
int xs, ys, clip = 0;
- float tc[4], xsd, ysd, cw = 0.f;
+ float tc[4], xsd, ysd, cw = 0.0f;
const float ux = ibuf->x * AFD->dxt[0], uy = ibuf->y * AFD->dxt[1];
const float vx = ibuf->x * AFD->dyt[0], vy = ibuf->y * AFD->dyt[1];
int xsam = (int)(0.5f * sqrtf(ux * ux + uy * uy) + 0.5f);
@@ -847,9 +847,9 @@ static void area_sample(TexResult *texr, ImBuf *ibuf, float fx, float fy, afdata
const int minsam = AFD->intpol ? 2 : 4;
xsam = CLAMPIS(xsam, minsam, ibuf->x * 2);
ysam = CLAMPIS(ysam, minsam, ibuf->y * 2);
- xsd = 1.f / xsam;
- ysd = 1.f / ysam;
- texr->tr = texr->tg = texr->tb = texr->ta = 0.f;
+ xsd = 1.0f / xsam;
+ ysd = 1.0f / ysam;
+ texr->tr = texr->tg = texr->tb = texr->ta = 0.0f;
for (ys = 0; ys < ysam; ys++) {
for (xs = 0; xs < xsam; xs++) {
const float su = (xs + ((ys & 1) + 0.5f) * 0.5f) * xsd - 0.5f;
@@ -859,11 +859,11 @@ static void area_sample(TexResult *texr, ImBuf *ibuf, float fx, float fy, afdata
const int out = ibuf_get_color_clip_bilerp(
tc, ibuf, pu * ibuf->x, pv * ibuf->y, AFD->intpol, AFD->extflag);
clip |= out;
- cw += out ? 0.f : 1.f;
+ cw += out ? 0.0f : 1.0f;
texr->tr += tc[0];
texr->tg += tc[1];
texr->tb += tc[2];
- texr->ta += texr->talpha ? tc[3] : 0.f;
+ texr->ta += texr->talpha ? tc[3] : 0.0f;
}
}
xsd *= ysd;
@@ -871,7 +871,7 @@ static void area_sample(TexResult *texr, ImBuf *ibuf, float fx, float fy, afdata
texr->tg *= xsd;
texr->tb *= xsd;
/* clipping can be ignored if alpha used, texr->ta already includes filtered edge */
- texr->ta = texr->talpha ? texr->ta * xsd : (clip ? cw * xsd : 1.f);
+ texr->ta = texr->talpha ? texr->ta * xsd : (clip ? cw * xsd : 1.0f);
}
typedef struct ReadEWAData {
@@ -906,19 +906,19 @@ static void ewa_eval(TexResult *texr, ImBuf *ibuf, float fx, float fy, afdata_t
static void feline_eval(TexResult *texr, ImBuf *ibuf, float fx, float fy, afdata_t *AFD)
{
const int maxn = AFD->iProbes - 1;
- const float ll = ((AFD->majrad == AFD->minrad) ? 2.f * AFD->majrad :
- 2.f * (AFD->majrad - AFD->minrad)) /
- (maxn ? (float)maxn : 1.f);
- float du = maxn ? cosf(AFD->theta) * ll : 0.f;
- float dv = maxn ? sinf(AFD->theta) * ll : 0.f;
+ const float ll = ((AFD->majrad == AFD->minrad) ? 2.0f * AFD->majrad :
+ 2.0f * (AFD->majrad - AFD->minrad)) /
+ (maxn ? (float)maxn : 1.0f);
+ float du = maxn ? cosf(AFD->theta) * ll : 0.0f;
+ float dv = maxn ? sinf(AFD->theta) * ll : 0.0f;
/* const float D = -0.5f*(du*du + dv*dv) / (AFD->majrad*AFD->majrad); */
const float D = (EWA_MAXIDX + 1) * 0.25f * (du * du + dv * dv) / (AFD->majrad * AFD->majrad);
- float d; /* TXF alpha: cw = 0.f; */
+ float d; /* TXF alpha: cw = 0.0f; */
int n; /* TXF alpha: clip = 0; */
/* have to use same scaling for du/dv here as for Ux/Vx/Uy/Vy (*after* D calc.) */
du *= AFD->dusc;
dv *= AFD->dvsc;
- d = texr->tr = texr->tb = texr->tg = texr->ta = 0.f;
+ d = texr->tr = texr->tb = texr->tg = texr->ta = 0.0f;
for (n = -maxn; n <= maxn; n += 2) {
float tc[4];
const float hn = n * 0.5f;
@@ -932,20 +932,20 @@ static void feline_eval(TexResult *texr, ImBuf *ibuf, float fx, float fy, afdata
/*const int out =*/ibuf_get_color_clip_bilerp(
tc, ibuf, ibuf->x * u, ibuf->y * v, AFD->intpol, AFD->extflag);
/* TXF alpha: clip |= out;
- * TXF alpha: cw += out ? 0.f : wt; */
+ * TXF alpha: cw += out ? 0.0f : wt; */
texr->tr += tc[0] * wt;
texr->tg += tc[1] * wt;
texr->tb += tc[2] * wt;
- texr->ta += texr->talpha ? tc[3] * wt : 0.f;
+ texr->ta += texr->talpha ? tc[3] * wt : 0.0f;
d += wt;
}
- d = 1.f / d;
+ d = 1.0f / d;
texr->tr *= d;
texr->tg *= d;
texr->tb *= d;
/* clipping can be ignored if alpha used, texr->ta already includes filtered edge */
- texr->ta = texr->talpha ? texr->ta * d : 1.f; // TXF alpha: (clip ? cw*d : 1.f);
+ texr->ta = texr->talpha ? texr->ta * d : 1.0f; // TXF alpha: (clip ? cw*d : 1.0f);
}
#undef EWA_MAXIDX
@@ -1032,7 +1032,7 @@ static int imagewraposa_aniso(Tex *tex,
filterfunc = area_sample;
}
- texres->tin = texres->ta = texres->tr = texres->tg = texres->tb = 0.f;
+ texres->tin = texres->ta = texres->tr = texres->tg = texres->tb = 0.0f;
/* we need to set retval OK, otherwise texture code generates normals itself... */
retval = texres->nor ? (TEX_RGB | TEX_NOR) : TEX_RGB;
@@ -1102,7 +1102,7 @@ static int imagewraposa_aniso(Tex *tex,
miny = addval;
}
}
- else if (tex->filtersize != 1.f) {
+ else if (tex->filtersize != 1.0f) {
minx *= tex->filtersize;
miny *= tex->filtersize;
dxt[0] *= tex->filtersize;
@@ -1196,8 +1196,8 @@ static int imagewraposa_aniso(Tex *tex,
}
}
/* scale around center, (0.5, 0.5) */
- if (tex->checkerdist < 1.f) {
- const float omcd = 1.f / (1.f - tex->checkerdist);
+ if (tex->checkerdist < 1.0f) {
+ const float omcd = 1.0f / (1.0f - tex->checkerdist);
fx = (fx - 0.5f) * omcd + 0.5f;
fy = (fy - 0.5f) * omcd + 0.5f;
minx *= omcd;
@@ -1206,8 +1206,8 @@ static int imagewraposa_aniso(Tex *tex,
}
if (tex->extend == TEX_CLIPCUBE) {
- if ((fx + minx) < 0.f || (fy + miny) < 0.f || (fx - minx) > 1.f || (fy - miny) > 1.f ||
- texvec[2] < -1.f || texvec[2] > 1.f) {
+ if ((fx + minx) < 0.0f || (fy + miny) < 0.0f || (fx - minx) > 1.0f || (fy - miny) > 1.0f ||
+ texvec[2] < -1.0f || texvec[2] > 1.0f) {
if (ima) {
BKE_image_pool_release_ibuf(ima, ibuf, pool);
}
@@ -1215,7 +1215,7 @@ static int imagewraposa_aniso(Tex *tex,
}
}
else if (tex->extend == TEX_CLIP || tex->extend == TEX_CHECKER) {
- if ((fx + minx) < 0.f || (fy + miny) < 0.f || (fx - minx) > 1.f || (fy - miny) > 1.f) {
+ if ((fx + minx) < 0.0f || (fy + miny) < 0.0f || (fx - minx) > 1.0f || (fy - miny) > 1.0f) {
if (ima) {
BKE_image_pool_release_ibuf(ima, ibuf, pool);
}
@@ -1224,8 +1224,8 @@ static int imagewraposa_aniso(Tex *tex,
}
else {
if (tex->extend == TEX_EXTEND) {
- fx = (fx > 1.f) ? 1.f : ((fx < 0.f) ? 0.f : fx);
- fy = (fy > 1.f) ? 1.f : ((fy < 0.f) ? 0.f : fy);
+ fx = (fx > 1.0f) ? 1.0f : ((fx < 0.0f) ? 0.0f : fx);
+ fy = (fy > 1.0f) ? 1.0f : ((fy < 0.0f) ? 0.0f : fy);
}
else {
fx -= floorf(fx);
@@ -1264,7 +1264,7 @@ static int imagewraposa_aniso(Tex *tex,
const float ff = sqrtf(ibuf->x), q = ibuf->y / ff;
const float Ux = dxt[0] * ff, Vx = dxt[1] * q, Uy = dyt[0] * ff, Vy = dyt[1] * q;
const float A = Vx * Vx + Vy * Vy;
- const float B = -2.f * (Ux * Vx + Uy * Vy);
+ const float B = -2.0f * (Ux * Vx + Uy * Vy);
const float C = Ux * Ux + Uy * Uy;
const float F = A * C - B * B * 0.25f;
float a, b, th, ecc;
@@ -1275,16 +1275,16 @@ static int imagewraposa_aniso(Tex *tex,
b *= ff;
a = max_ff(a, 1.0f);
b = max_ff(b, 1.0f);
- fProbes = 2.f * (a / b) - 1.f;
+ fProbes = 2.0f * (a / b) - 1.0f;
AFD.iProbes = round_fl_to_int(fProbes);
AFD.iProbes = MIN2(AFD.iProbes, tex->afmax);
if (AFD.iProbes < fProbes) {
- b = 2.f * a / (float)(AFD.iProbes + 1);
+ b = 2.0f * a / (float)(AFD.iProbes + 1);
}
AFD.majrad = a / ff;
AFD.minrad = b / ff;
AFD.theta = th;
- AFD.dusc = 1.f / ff;
+ AFD.dusc = 1.0f / ff;
AFD.dvsc = ff / (float)ibuf->y;
}
else { /* EWA & area */
@@ -1308,13 +1308,13 @@ static int imagewraposa_aniso(Tex *tex,
}
/* mipmap level */
- if (levf < 0.f) { /* original image only */
+ if (levf < 0.0f) { /* original image only */
previbuf = curibuf = mipmaps[0];
- levf = 0.f;
+ levf = 0.0f;
}
else if (levf >= maxlev - 1) {
previbuf = curibuf = mipmaps[maxlev - 1];
- levf = 0.f;
+ levf = 0.0f;
if (tex->texfilter == TXF_FELINE) {
AFD.iProbes = 1;
}
@@ -1377,7 +1377,7 @@ static int imagewraposa_aniso(Tex *tex,
const float ff = sqrtf(ibuf->x), q = ibuf->y / ff;
const float Ux = dxt[0] * ff, Vx = dxt[1] * q, Uy = dyt[0] * ff, Vy = dyt[1] * q;
const float A = Vx * Vx + Vy * Vy;
- const float B = -2.f * (Ux * Vx + Uy * Vy);
+ const float B = -2.0f * (Ux * Vx + Uy * Vy);
const float C = Ux * Ux + Uy * Uy;
const float F = A * C - B * B * 0.25f;
float a, b, th, ecc, fProbes;
@@ -1386,16 +1386,16 @@ static int imagewraposa_aniso(Tex *tex,
b *= ff;
a = max_ff(a, 1.0f);
b = max_ff(b, 1.0f);
- fProbes = 2.f * (a / b) - 1.f;
+ fProbes = 2.0f * (a / b) - 1.0f;
/* no limit to number of Probes here */
AFD.iProbes = round_fl_to_int(fProbes);
if (AFD.iProbes < fProbes) {
- b = 2.f * a / (float)(AFD.iProbes + 1);
+ b = 2.0f * a / (float)(AFD.iProbes + 1);
}
AFD.majrad = a / ff;
AFD.minrad = b / ff;
AFD.theta = th;
- AFD.dusc = 1.f / ff;
+ AFD.dusc = 1.0f / ff;
AFD.dvsc = ff / (float)ibuf->y;
}
if (texres->nor && ((tex->imaflag & TEX_NORMALMAP) == 0)) {
@@ -1425,7 +1425,7 @@ static int imagewraposa_aniso(Tex *tex,
texres->tin = texres->ta;
}
if (tex->flag & TEX_NEGALPHA) {
- texres->ta = 1.f - texres->ta;
+ texres->ta = 1.0f - texres->ta;
}
if (texres->nor && (tex->imaflag & TEX_NORMALMAP)) { /* normal from color */
@@ -1435,9 +1435,9 @@ static int imagewraposa_aniso(Tex *tex,
* the normal used in the renderer points inward. It is generated
* this way in calc_vertexnormals(). Should this ever change
* this negate must be removed. */
- texres->nor[0] = -2.f * (texres->tr - 0.5f);
- texres->nor[1] = 2.f * (texres->tg - 0.5f);
- texres->nor[2] = 2.f * (texres->tb - 0.5f);
+ texres->nor[0] = -2.0f * (texres->tr - 0.5f);
+ texres->nor[1] = 2.0f * (texres->tg - 0.5f);
+ texres->nor[2] = 2.0f * (texres->tb - 0.5f);
}
/* de-premul, this is being premulled in shade_input_do_shade()
@@ -1449,7 +1449,7 @@ static int imagewraposa_aniso(Tex *tex,
/* do not de-premul for generated alpha, it is already in straight */
if (texres->ta != 1.0f && texres->ta > 1e-4f && !(tex->imaflag & TEX_CALCALPHA)) {
- fx = 1.f / texres->ta;
+ fx = 1.0f / texres->ta;
texres->tr *= fx;
texres->tg *= fx;
texres->tb *= fx;
@@ -1964,9 +1964,9 @@ int imagewraposa(Tex *tex,
* the normal used in the renderer points inward. It is generated
* this way in calc_vertexnormals(). Should this ever change
* this negate must be removed. */
- texres->nor[0] = -2.f * (texres->tr - 0.5f);
- texres->nor[1] = 2.f * (texres->tg - 0.5f);
- texres->nor[2] = 2.f * (texres->tb - 0.5f);
+ texres->nor[0] = -2.0f * (texres->tr - 0.5f);
+ texres->nor[1] = 2.0f * (texres->tg - 0.5f);
+ texres->nor[2] = 2.0f * (texres->tb - 0.5f);
}
/* de-premul, this is being premulled in shade_input_do_shade() */
diff --git a/source/blender/render/intern/source/render_texture.c b/source/blender/render/intern/source/render_texture.c
index 2b4d7ac67ff..ff9c462f603 100644
--- a/source/blender/render/intern/source/render_texture.c
+++ b/source/blender/render/intern/source/render_texture.c
@@ -758,7 +758,7 @@ static int voronoiTex(const Tex *tex, const float texvec[3], TexResult *texres)
float aw3 = fabsf(tex->vn_w3);
float aw4 = fabsf(tex->vn_w4);
float sc = (aw1 + aw2 + aw3 + aw4);
- if (sc != 0.f) {
+ if (sc != 0.0f) {
sc = tex->ns_outscale / sc;
}
diff --git a/source/blender/sequencer/intern/modifier.c b/source/blender/sequencer/intern/modifier.c
index f912fd50f0d..cb15028cc23 100644
--- a/source/blender/sequencer/intern/modifier.c
+++ b/source/blender/sequencer/intern/modifier.c
@@ -267,8 +267,8 @@ MINLINE float color_balance_fl(
float x = (((in - 1.0f) * lift) + 1.0f) * gain;
/* prevent NaN */
- if (x < 0.f) {
- x = 0.f;
+ if (x < 0.0f) {
+ x = 0.0f;
}
x = powf(x, gamma) * mul;
@@ -850,7 +850,7 @@ static void hue_correct_apply_threaded(int width,
/* adjust value, scaling returned default 0.5 up to 1 */
f = BKE_curvemapping_evaluateF(curve_mapping, 2, hsv[0]);
- hsv[2] *= (f * 2.f);
+ hsv[2] *= (f * 2.0f);
hsv[0] = hsv[0] - floorf(hsv[0]); /* mod 1.0 */
CLAMP(hsv[1], 0.0f, 1.0f);
@@ -1242,7 +1242,7 @@ static void tonemapmodifier_apply(struct SequenceModifierData *smd, ImBuf *ibuf,
unsigned char *cp = (unsigned char *)ibuf->rect;
float avl, maxl = -FLT_MAX, minl = FLT_MAX;
const float sc = 1.0f / p;
- float Lav = 0.f;
+ float Lav = 0.0f;
float cav[4] = {0.0f, 0.0f, 0.0f, 0.0f};
while (p--) {
float pixel[4];
diff --git a/source/blender/windowmanager/intern/wm_jobs.c b/source/blender/windowmanager/intern/wm_jobs.c
index eccad214305..fc65a072b6a 100644
--- a/source/blender/windowmanager/intern/wm_jobs.c
+++ b/source/blender/windowmanager/intern/wm_jobs.c
@@ -251,7 +251,7 @@ float WM_jobs_progress(wmWindowManager *wm, void *owner)
static void wm_jobs_update_progress_bars(wmWindowManager *wm)
{
- float total_progress = 0.f;
+ float total_progress = 0.0f;
float jobs_progress = 0;
LISTBASE_FOREACH (wmJob *, wm_job, &wm->jobs) {
diff --git a/source/blender/windowmanager/intern/wm_operator_props.c b/source/blender/windowmanager/intern/wm_operator_props.c
index 87716a61c39..631a4d23eb5 100644
--- a/source/blender/windowmanager/intern/wm_operator_props.c
+++ b/source/blender/windowmanager/intern/wm_operator_props.c
@@ -284,12 +284,12 @@ void WM_operator_properties_select_random(wmOperatorType *ot)
{
RNA_def_float_percentage(ot->srna,
"percent",
- 50.f,
+ 50.0f,
0.0f,
100.0f,
"Percent",
"Percentage of objects to select randomly",
- 0.f,
+ 0.0f,
100.0f);
RNA_def_int(ot->srna,
"seed",
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index 756c932b31c..7b1d69e83c7 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -2886,7 +2886,7 @@ static int radial_control_modal(bContext *C, wmOperator *op, const wmEvent *even
case PROP_FACTOR:
new_value = (WM_RADIAL_CONTROL_DISPLAY_SIZE - dist) / WM_RADIAL_CONTROL_DISPLAY_WIDTH;
if (snap) {
- new_value = ((int)ceil(new_value * 10.f) * 10.0f) / 100.f;
+ new_value = ((int)ceil(new_value * 10.0f) * 10.0f) / 100.0f;
}
/* Invert new value to increase the factor moving the mouse to the right */
new_value = 1 - new_value;