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>2012-04-11 12:15:13 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-04-11 12:15:13 +0400
commitb4a0152e76683dfb170c3e2796e15e1b5b67e2ab (patch)
tree15466a4e658f8fd42d55b9748bbeb6f02c12ba30
parent9ae0523921fa4baeb37bcdd36f208da952f4337f (diff)
code cleanup: float formatting was confusing in some cases - eg: (0.,0.,0.)
-rw-r--r--source/blender/blenkernel/BKE_particle.h2
-rw-r--r--source/blender/blenkernel/intern/CCGSubSurf.c2
-rw-r--r--source/blender/blenkernel/intern/action.c4
-rw-r--r--source/blender/blenkernel/intern/object.c4
-rw-r--r--source/blender/blenkernel/intern/sequencer.c2
-rw-r--r--source/blender/blenkernel/intern/smoke.c6
-rw-r--r--source/blender/blenlib/intern/math_base.c4
-rw-r--r--source/blender/blenlib/intern/noise.c8
-rw-r--r--source/blender/blenloader/intern/readfile.c2
-rw-r--r--source/blender/bmesh/intern/bmesh_operator_api.h2
-rw-r--r--source/blender/editors/gpencil/drawgpencil.c4
-rw-r--r--source/blender/editors/screen/area.c4
-rw-r--r--source/blender/editors/space_logic/logic_window.c2
-rw-r--r--source/blender/editors/space_view3d/drawobject.c2
-rw-r--r--source/blender/editors/space_view3d/drawvolume.c2
-rw-r--r--source/blender/editors/space_view3d/view3d_draw.c4
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_tonemap.c6
-rw-r--r--source/blender/render/intern/source/convertblender.c4
-rw-r--r--source/gameengine/Converter/BL_DeformableGameObject.h2
-rw-r--r--source/gameengine/GamePlayer/ghost/GPG_System.cpp2
-rw-r--r--source/gameengine/Ketsji/KX_Camera.cpp12
-rw-r--r--source/gameengine/Ketsji/KX_ObstacleSimulation.cpp2
-rw-r--r--source/gameengine/Ketsji/KX_RayCast.cpp2
-rw-r--r--source/gameengine/Ketsji/KX_SteeringActuator.cpp4
-rw-r--r--source/gameengine/Ketsji/KX_TimeCategoryLogger.cpp2
-rw-r--r--source/gameengine/Ketsji/KX_TimeLogger.cpp4
-rw-r--r--source/gameengine/Physics/Bullet/CcdGraphicController.cpp12
-rw-r--r--source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp4
-rw-r--r--source/gameengine/SceneGraph/SG_BBox.cpp4
-rw-r--r--source/gameengine/SceneGraph/SG_BBox.h2
30 files changed, 58 insertions, 58 deletions
diff --git a/source/blender/blenkernel/BKE_particle.h b/source/blender/blenkernel/BKE_particle.h
index 08f9dfb05f3..3e0180a84aa 100644
--- a/source/blender/blenkernel/BKE_particle.h
+++ b/source/blender/blenkernel/BKE_particle.h
@@ -64,7 +64,7 @@ struct BVHTreeRayHit;
#define LOOP_EXISTING_PARTICLES for(p=0, pa=psys->particles; p<psys->totpart; p++, pa++) if(!(pa->flag & PARS_UNEXIST))
#define LOOP_SHOWN_PARTICLES for(p=0, pa=psys->particles; p<psys->totpart; p++, pa++) if(!(pa->flag & (PARS_UNEXIST|PARS_NO_DISP)))
/* OpenMP: Can only advance one variable within loop definition. */
-#define LOOP_DYNAMIC_PARTICLES for(p=0; p<psys->totpart; p++ ) if((pa=psys->particles+p)->state.time > 0.f)
+#define LOOP_DYNAMIC_PARTICLES for(p=0; p<psys->totpart; p++ ) if((pa=psys->particles+p)->state.time > 0.0f)
#define PSYS_FRAND_COUNT 1024
#define PSYS_FRAND(seed) psys->frand[(seed) % PSYS_FRAND_COUNT]
diff --git a/source/blender/blenkernel/intern/CCGSubSurf.c b/source/blender/blenkernel/intern/CCGSubSurf.c
index f0075217102..9b55785d1a4 100644
--- a/source/blender/blenkernel/intern/CCGSubSurf.c
+++ b/source/blender/blenkernel/intern/CCGSubSurf.c
@@ -744,7 +744,7 @@ static void _face_calcIFNo(CCGFace *f, int lvl, int S, int x, int y, float *no,
length = sqrtf(no[0] * no[0] + no[1] * no[1] + no[2] * no[2]);
if (length > EPSILON) {
- float invLength = 1.f/length;
+ float invLength = 1.0f / length;
no[0] *= invLength;
no[1] *= invLength;
diff --git a/source/blender/blenkernel/intern/action.c b/source/blender/blenkernel/intern/action.c
index 78668a5a2e4..c77e384a264 100644
--- a/source/blender/blenkernel/intern/action.c
+++ b/source/blender/blenkernel/intern/action.c
@@ -546,8 +546,8 @@ void init_pose_itasc(bItasc *itasc)
itasc->numstep = 4;
itasc->precision = 0.005f;
itasc->flag = ITASC_AUTO_STEP|ITASC_INITIAL_REITERATION;
- itasc->feedback = 20.f;
- itasc->maxvel = 50.f;
+ itasc->feedback = 20.0f;
+ itasc->maxvel = 50.0f;
itasc->solver = ITASC_SOLVER_SDLS;
itasc->dampmax = 0.5;
itasc->dampeps = 0.15;
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c
index c62653b29e7..237d268e307 100644
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@ -847,8 +847,8 @@ Object *add_only_object(int type, const char *name)
ob->init_state=1;
ob->state=1;
/* ob->pad3 == Contact Processing Threshold */
- ob->m_contactProcessingThreshold = 1.;
- ob->obstacleRad = 1.;
+ ob->m_contactProcessingThreshold = 1.0f;
+ ob->obstacleRad = 1.0f;
/* NT fluid sim defaults */
ob->fluidsimSettings = NULL;
diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c
index 10cc64890b9..99fc2242f9f 100644
--- a/source/blender/blenkernel/intern/sequencer.c
+++ b/source/blender/blenkernel/intern/sequencer.c
@@ -592,7 +592,7 @@ void calc_sequence(Scene *scene, Sequence *seq)
if (seq->seq1) {
/* XXX These resets should not be necessary, but users used to be able to
- * edit effect's length, leading to strange results. See #29190. */
+ * edit effect's length, leading to strange results. See [#29190] */
seq->startofs = seq->endofs = seq->startstill = seq->endstill = 0;
seq->start = seq->startdisp = MAX3(seq->seq1->startdisp, seq->seq2->startdisp, seq->seq3->startdisp);
seq->enddisp = MIN3(seq->seq1->enddisp, seq->seq2->enddisp, seq->seq3->enddisp);
diff --git a/source/blender/blenkernel/intern/smoke.c b/source/blender/blenkernel/intern/smoke.c
index 00cac3b58d7..9d13397859d 100644
--- a/source/blender/blenkernel/intern/smoke.c
+++ b/source/blender/blenkernel/intern/smoke.c
@@ -134,7 +134,7 @@ struct Scene;
struct DerivedMesh;
struct SmokeModifierData;
-#define TRI_UVOFFSET (1./4.)
+#define TRI_UVOFFSET (1.0 / 4.0)
/* forward declerations */
static void calcTriangleDivs(Object *ob, MVert *verts, int numverts, MFace *tris, int numfaces, int numtris, int **tridivs, float cell_len);
@@ -949,8 +949,8 @@ static void smoke_calc_domain(Scene *scene, Object *ob, SmokeModifierData *smd)
if (usqr>maxusqr) {
// cutoff at maxVelVal
for (int jj=0; jj<3; jj++) {
- if (objvel[jj]>0.) objvel[jj] = maxVelVal;
- if (objvel[jj]<0.) objvel[jj] = -maxVelVal;
+ if (objvel[jj] > 0.0) objvel[jj] = maxVelVal;
+ if (objvel[jj] < 0.0) objvel[jj] = -maxVelVal;
}
}
}
diff --git a/source/blender/blenlib/intern/math_base.c b/source/blender/blenlib/intern/math_base.c
index 9efcb3dbcae..6bb238ac612 100644
--- a/source/blender/blenlib/intern/math_base.c
+++ b/source/blender/blenlib/intern/math_base.c
@@ -37,8 +37,8 @@
/* from python 3.1 pymath.c */
double copysign(double x, double y)
{
- /* use atan2 to distinguish -0. from 0. */
- if (y > 0. || (y == 0. && atan2(y, -1.) > 0.)) {
+ /* use atan2 to distinguish -0.0 from 0.0 */
+ if (y > 0.0 || (y == 0.0 && atan2(y, -1.0) > 0.0)) {
return fabs(x);
}
else {
diff --git a/source/blender/blenlib/intern/noise.c b/source/blender/blenlib/intern/noise.c
index f1749d0b7cd..5db42c35f5c 100644
--- a/source/blender/blenlib/intern/noise.c
+++ b/source/blender/blenlib/intern/noise.c
@@ -1002,11 +1002,11 @@ static float turbulence_perlin(float *point, float lofreq, float hifreq)
p[2] = point[2];
t = 0;
- for (freq = lofreq ; freq < hifreq ; freq *= 2.) {
+ for (freq = lofreq ; freq < hifreq ; freq *= 2.0) {
t += fabsf(noise3_perlin(p)) / freq;
- p[0] *= 2.;
- p[1] *= 2.;
- p[2] *= 2.;
+ p[0] *= 2.0f;
+ p[1] *= 2.0f;
+ p[2] *= 2.0f;
}
return t - 0.3; /* readjust to make mean value = 0.0 */
}
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 46ff416f4ab..5114be4f785 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -10778,7 +10778,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
Object *ob;
World *wrld;
for (ob = main->object.first; ob; ob= ob->id.next) {
- ob->m_contactProcessingThreshold = 1.; //pad3 is used for m_contactProcessingThreshold
+ ob->m_contactProcessingThreshold = 1.0f; //pad3 is used for m_contactProcessingThreshold
if (ob->parent) {
/* check if top parent has compound shape set and if yes, set this object
to compound shaper as well (was the behavior before, now it's optional) */
diff --git a/source/blender/bmesh/intern/bmesh_operator_api.h b/source/blender/bmesh/intern/bmesh_operator_api.h
index 7cba66995c9..b01b80f1ef4 100644
--- a/source/blender/bmesh/intern/bmesh_operator_api.h
+++ b/source/blender/bmesh/intern/bmesh_operator_api.h
@@ -90,7 +90,7 @@ BLI_INLINE void _bmo_elem_flag_set( BMesh *bm, BMFlagLayer *oflags, const
BLI_INLINE void _bmo_elem_flag_toggle( BMesh *bm, BMFlagLayer *oflags, const short oflag);
/* slot type arrays are terminated by the last member
- * having a slot type of 0.*/
+ * having a slot type of 0 */
enum {
BMO_OP_SLOT_SENTINEL = 0,
BMO_OP_SLOT_BOOL = 1,
diff --git a/source/blender/editors/gpencil/drawgpencil.c b/source/blender/editors/gpencil/drawgpencil.c
index 8f0ea378a2a..7726e707f08 100644
--- a/source/blender/editors/gpencil/drawgpencil.c
+++ b/source/blender/editors/gpencil/drawgpencil.c
@@ -196,9 +196,9 @@ static void gp_draw_stroke_point (bGPDspoint *points, short thickness, short dfl
gluQuadricDrawStyle(qobj, GLU_FILL);
/* need to translate drawing position, but must reset after too! */
- glTranslatef(co[0], co[1], 0.);
+ glTranslatef(co[0], co[1], 0.0);
gluDisk(qobj, 0.0, thickness, 32, 1);
- glTranslatef(-co[0], -co[1], 0.);
+ glTranslatef(-co[0], -co[1], 0.0);
gluDeleteQuadric(qobj);
}
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c
index 43b917c2186..bed17048ea1 100644
--- a/source/blender/editors/screen/area.c
+++ b/source/blender/editors/screen/area.c
@@ -204,8 +204,8 @@ static void region_draw_azone_icon(AZone *az)
qobj = gluNewQuadric();
- glPushMatrix();
- glTranslatef(midx, midy, 0.);
+ glPushMatrix();
+ glTranslatef(midx, midy, 0.0);
/* outlined circle */
glEnable(GL_LINE_SMOOTH);
diff --git a/source/blender/editors/space_logic/logic_window.c b/source/blender/editors/space_logic/logic_window.c
index 37b284a030d..0467579d0f2 100644
--- a/source/blender/editors/space_logic/logic_window.c
+++ b/source/blender/editors/space_logic/logic_window.c
@@ -1051,7 +1051,7 @@ static void draw_default_sensor_header(bSensor *sens,
/* Pulsing and frequency */
uiBlockBeginAlign(block);
uiDefIconButBitS(block, TOG, SENS_PULSE_REPEAT, 1, ICON_DOTSUP,
- (short)(x + 10 + 0. * (w-20)), (short)(y - 21), (short)(0.1 * (w-20)), 19,
+ (short)(x + 10 + 0.0 * (w - 20)), (short)(y - 21), (short)(0.1 * (w - 20)), 19,
&sens->pulse, 0.0, 0.0, 0, 0,
"Activate TRUE level triggering (pulse mode)");
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index 97e52a21e25..29b12708e2d 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -5624,7 +5624,7 @@ static void draw_empty_cone(float size)
radius = size;
glTranslatef(cent, cent, cent);
glScalef(radius, size * 2.0f, radius);
- glRotatef(-90., 1.0, 0.0, 0.0);
+ glRotatef(-90.0, 1.0, 0.0, 0.0);
gluCylinder(qobj, 1.0, 0.0, 1.0, 8, 1);
glPopMatrix();
diff --git a/source/blender/editors/space_view3d/drawvolume.c b/source/blender/editors/space_view3d/drawvolume.c
index 2289216c2a8..0e520a511fe 100644
--- a/source/blender/editors/space_view3d/drawvolume.c
+++ b/source/blender/editors/space_view3d/drawvolume.c
@@ -166,7 +166,7 @@ void draw_volume(ARegion *ar, GPUTexture *tex, float *min, float *max, int res[3
float d /*, d0 */ /* UNUSED */, dd, ds;
float *points = NULL;
int numpoints = 0;
- float cor[3] = {1., 1., 1.};
+ float cor[3] = {1.0f, 1.0f, 1.0f};
int gl_depth = 0, gl_blend = 0;
/* draw slices of smoke is adapted from c++ code authored
diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c
index 9e5bd1c860c..95a9d58c36e 100644
--- a/source/blender/editors/space_view3d/view3d_draw.c
+++ b/source/blender/editors/space_view3d/view3d_draw.c
@@ -119,7 +119,7 @@ void circf(float x, float y, float rad)
glPushMatrix();
- glTranslatef(x, y, 0.);
+ glTranslatef(x, y, 0.0);
gluDisk(qobj, 0.0, rad, 32, 1);
@@ -136,7 +136,7 @@ void circ(float x, float y, float rad)
glPushMatrix();
- glTranslatef(x, y, 0.);
+ glTranslatef(x, y, 0.0);
gluDisk(qobj, 0.0, rad, 32, 1);
diff --git a/source/blender/nodes/composite/nodes/node_composite_tonemap.c b/source/blender/nodes/composite/nodes/node_composite_tonemap.c
index baa5ba046dd..0696c2ba848 100644
--- a/source/blender/nodes/composite/nodes/node_composite_tonemap.c
+++ b/source/blender/nodes/composite/nodes/node_composite_tonemap.c
@@ -118,9 +118,9 @@ static void tonemap(NodeTonemap* ntm, CompBuf* dst, CompBuf* src)
dp[x][1] /= ((dg == 0.f) ? 1.f : dg);
dp[x][2] /= ((db == 0.f) ? 1.f : db);
if (igm != 0.f) {
- dp[x][0] = pow((double)MAX2(dp[x][0], 0.), igm);
- dp[x][1] = pow((double)MAX2(dp[x][1], 0.), igm);
- dp[x][2] = pow((double)MAX2(dp[x][2], 0.), igm);
+ dp[x][0] = pow((double)MAX2(dp[x][0], 0.0), igm);
+ dp[x][1] = pow((double)MAX2(dp[x][1], 0.0), igm);
+ dp[x][2] = pow((double)MAX2(dp[x][2], 0.0), igm);
}
}
}
diff --git a/source/blender/render/intern/source/convertblender.c b/source/blender/render/intern/source/convertblender.c
index 9b12d556320..21cfb8b6db7 100644
--- a/source/blender/render/intern/source/convertblender.c
+++ b/source/blender/render/intern/source/convertblender.c
@@ -5478,8 +5478,8 @@ static int load_fluidsimspeedvectors(Render *re, ObjectInstanceRen *obi, float *
ver++;
// get fluid velocity
- fsvec[3] = 0.;
- //fsvec[0] = fsvec[1] = fsvec[2] = fsvec[3] = 0.; fsvec[2] = 2.; // NT fixed test
+ fsvec[3] = 0.0f;
+ //fsvec[0] = fsvec[1] = fsvec[2] = fsvec[3] = 0.0; fsvec[2] = 2.0f; // NT fixed test
for (j=0;j<3;j++) fsvec[j] = velarray[a].vel[j];
/* (bad) HACK insert average velocity if none is there (see previous comment) */
diff --git a/source/gameengine/Converter/BL_DeformableGameObject.h b/source/gameengine/Converter/BL_DeformableGameObject.h
index b86069bca1b..d0fe741672d 100644
--- a/source/gameengine/Converter/BL_DeformableGameObject.h
+++ b/source/gameengine/Converter/BL_DeformableGameObject.h
@@ -70,7 +70,7 @@ public:
KX_GameObject(sgReplicationInfo,callbacks),
m_pDeformer(NULL),
m_activeAct(NULL),
- m_lastframe(0.),
+ m_lastframe(0.0),
m_blendobj(blendobj),
m_activePriority(9999)
{
diff --git a/source/gameengine/GamePlayer/ghost/GPG_System.cpp b/source/gameengine/GamePlayer/ghost/GPG_System.cpp
index d5e45029679..6710572d843 100644
--- a/source/gameengine/GamePlayer/ghost/GPG_System.cpp
+++ b/source/gameengine/GamePlayer/ghost/GPG_System.cpp
@@ -46,7 +46,7 @@ double GPG_System::GetTimeInSeconds()
{
GHOST_TInt64 millis = (GHOST_TInt64)m_system->getMilliSeconds();
double time = (double)millis;
- time /= 1000.;
+ time /= 1000.0f;
return time;
}
diff --git a/source/gameengine/Ketsji/KX_Camera.cpp b/source/gameengine/Ketsji/KX_Camera.cpp
index 0aaedd4d83b..a9602d16430 100644
--- a/source/gameengine/Ketsji/KX_Camera.cpp
+++ b/source/gameengine/Ketsji/KX_Camera.cpp
@@ -306,14 +306,14 @@ void KX_Camera::ExtractFrustumSphere()
MT_Vector4 nfar; // far point in device normalized coordinate
MT_Point3 farpoint; // most extreme far point in camera coordinate
MT_Point3 nearpoint;// most extreme near point in camera coordinate
- MT_Point3 farcenter(0.,0.,0.);// center of far cliping plane in camera coordinate
+ MT_Point3 farcenter(0.0, 0.0, 0.0);// center of far cliping plane in camera coordinate
MT_Scalar F=-1.0, N; // square distance of far and near point to origin
MT_Scalar f, n; // distance of far and near point to z axis. f is always > 0 but n can be < 0
MT_Scalar e, s; // far and near clipping distance (<0)
MT_Scalar c; // slope of center line = distance of far clipping center to z axis / far clipping distance
MT_Scalar z; // projection of sphere center on z axis (<0)
// tmp value
- MT_Vector4 npoint(1., 1., 1., 1.);
+ MT_Vector4 npoint(1.0, 1.0, 1.0, 1.0);
MT_Vector4 hpoint;
MT_Point3 point;
MT_Scalar len;
@@ -337,7 +337,7 @@ void KX_Camera::ExtractFrustumSphere()
// the far center is the average of the far clipping points
farcenter *= 0.25;
// the extreme near point is the opposite point on the near clipping plane
- nfar.setValue(-nfar[0], -nfar[1], -1., 1.);
+ nfar.setValue(-nfar[0], -nfar[1], -1.0, 1.0);
nfar = clip_camcs_matrix*nfar;
nearpoint.setValue(nfar[0]/nfar[3], nfar[1]/nfar[3], nfar[2]/nfar[3]);
// this is a frustrum projection
@@ -362,7 +362,7 @@ void KX_Camera::ExtractFrustumSphere()
{
// orthographic projection
// The most extreme points on the near and far plane. (normalized device coords)
- MT_Vector4 hnear(1., 1., 1., 1.), hfar(-1., -1., -1., 1.);
+ MT_Vector4 hnear(1.0, 1.0, 1.0, 1.0), hfar(-1.0, -1.0, -1.0, 1.0);
// Transform to hom camera local space
hnear = clip_camcs_matrix*hnear;
@@ -389,7 +389,7 @@ bool KX_Camera::PointInsideFrustum(const MT_Point3& x)
for ( unsigned int i = 0; i < 6 ; i++ )
{
- if (m_planes[i][0]*x[0] + m_planes[i][1]*x[1] + m_planes[i][2]*x[2] + m_planes[i][3] < 0.)
+ if (m_planes[i][0] * x[0] + m_planes[i][1] * x[1] + m_planes[i][2] * x[2] + m_planes[i][3] < 0.0)
return false;
}
return true;
@@ -407,7 +407,7 @@ int KX_Camera::BoxInsideFrustum(const MT_Point3 *box)
// 8 box vertices.
for (unsigned int v = 0; v < 8 ; v++)
{
- if (m_planes[p][0]*box[v][0] + m_planes[p][1]*box[v][1] + m_planes[p][2]*box[v][2] + m_planes[p][3] < 0.)
+ if (m_planes[p][0] * box[v][0] + m_planes[p][1] * box[v][1] + m_planes[p][2] * box[v][2] + m_planes[p][3] < 0.0)
behindCount++;
}
diff --git a/source/gameengine/Ketsji/KX_ObstacleSimulation.cpp b/source/gameengine/Ketsji/KX_ObstacleSimulation.cpp
index f9d60c57adc..b8169899c78 100644
--- a/source/gameengine/Ketsji/KX_ObstacleSimulation.cpp
+++ b/source/gameengine/Ketsji/KX_ObstacleSimulation.cpp
@@ -343,7 +343,7 @@ void KX_ObstacleSimulation::DrawObstacles()
if (!m_enableVisualization)
return;
static const MT_Vector3 bluecolor(0,0,1);
- static const MT_Vector3 normal(0.,0.,1.);
+ static const MT_Vector3 normal(0.0, 0.0, 1.0);
static const int SECTORS_NUM = 32;
for (size_t i=0; i<m_obstacles.size(); i++)
{
diff --git a/source/gameengine/Ketsji/KX_RayCast.cpp b/source/gameengine/Ketsji/KX_RayCast.cpp
index 29e9fb5bca0..459600f2e34 100644
--- a/source/gameengine/Ketsji/KX_RayCast.cpp
+++ b/source/gameengine/Ketsji/KX_RayCast.cpp
@@ -103,7 +103,7 @@ bool KX_RayCast::RayTest(PHY_IPhysicsEnvironment* physics_environment, const MT_
// Note that retrieving in a single shot multiple hit points would be possible
// but it would require some change in Bullet.
prevpoint = callback.m_hitPoint;
- /* We add 0.001 of fudge, so that if the margin && radius == 0., we don't endless loop. */
+ /* We add 0.001 of fudge, so that if the margin && radius == 0.0, we don't endless loop. */
MT_Scalar marg = 0.001 + hit_controller->GetMargin();
marg *= 2.f;
/* Calculate the other side of this object */
diff --git a/source/gameengine/Ketsji/KX_SteeringActuator.cpp b/source/gameengine/Ketsji/KX_SteeringActuator.cpp
index f3aecd9e0ba..dd2ff2e305a 100644
--- a/source/gameengine/Ketsji/KX_SteeringActuator.cpp
+++ b/source/gameengine/Ketsji/KX_SteeringActuator.cpp
@@ -266,11 +266,11 @@ bool KX_SteeringActuator::Update(double curtime, bool frame)
if (m_simulation && m_obstacle /*&& !newvel.fuzzyZero()*/)
{
if (m_enableVisualization)
- KX_RasterizerDrawDebugLine(mypos, mypos + newvel, MT_Vector3(1.,0.,0.));
+ KX_RasterizerDrawDebugLine(mypos, mypos + newvel, MT_Vector3(1.0, 0.0, 0.0));
m_simulation->AdjustObstacleVelocity(m_obstacle, m_mode!=KX_STEERING_PATHFOLLOWING ? m_navmesh : NULL,
newvel, m_acceleration*delta, m_turnspeed/180.0f*M_PI*delta);
if (m_enableVisualization)
- KX_RasterizerDrawDebugLine(mypos, mypos + newvel, MT_Vector3(0.,1.,0.));
+ KX_RasterizerDrawDebugLine(mypos, mypos + newvel, MT_Vector3(0.0, 1.0, 0.0));
}
HandleActorFace(newvel);
diff --git a/source/gameengine/Ketsji/KX_TimeCategoryLogger.cpp b/source/gameengine/Ketsji/KX_TimeCategoryLogger.cpp
index 2b09fe09fc1..13717993c4c 100644
--- a/source/gameengine/Ketsji/KX_TimeCategoryLogger.cpp
+++ b/source/gameengine/Ketsji/KX_TimeCategoryLogger.cpp
@@ -120,7 +120,7 @@ double KX_TimeCategoryLogger::GetAverage(TimeCategory tc)
double KX_TimeCategoryLogger::GetAverage(void)
{
- double time = 0.;
+ double time = 0.0;
KX_TimeLoggerMap::iterator it;
for (it = m_loggers.begin(); it != m_loggers.end(); it++) {
diff --git a/source/gameengine/Ketsji/KX_TimeLogger.cpp b/source/gameengine/Ketsji/KX_TimeLogger.cpp
index e0aea45291c..1a0d3d28d4c 100644
--- a/source/gameengine/Ketsji/KX_TimeLogger.cpp
+++ b/source/gameengine/Ketsji/KX_TimeLogger.cpp
@@ -87,7 +87,7 @@ void KX_TimeLogger::NextMeasurement(double now)
EndLog(now);
// Add a new measurement at the front
- double m = 0.;
+ double m = 0.0;
m_measurements.push_front(m);
// Remove measurement if we grow beyond the maximum size
@@ -102,7 +102,7 @@ void KX_TimeLogger::NextMeasurement(double now)
double KX_TimeLogger::GetAverage(void) const
{
- double avg = 0.;
+ double avg = 0.0;
unsigned int numMeasurements = m_measurements.size();
if (numMeasurements > 1) {
diff --git a/source/gameengine/Physics/Bullet/CcdGraphicController.cpp b/source/gameengine/Physics/Bullet/CcdGraphicController.cpp
index 92cba6e9afc..36e7b0d482f 100644
--- a/source/gameengine/Physics/Bullet/CcdGraphicController.cpp
+++ b/source/gameengine/Physics/Bullet/CcdGraphicController.cpp
@@ -86,12 +86,12 @@ void CcdGraphicController::getAabb(btVector3& aabbMin, btVector3& aabbMax)
btVector3 tmpAabbMin = m_localAabbMin * scale;
btVector3 tmpAabbMax = m_localAabbMax * scale;
- localAabbMin[0] = (scale.getX() >= 0.) ? tmpAabbMin[0] : tmpAabbMax[0];
- localAabbMin[1] = (scale.getY() >= 0.) ? tmpAabbMin[1] : tmpAabbMax[1];
- localAabbMin[2] = (scale.getZ() >= 0.) ? tmpAabbMin[2] : tmpAabbMax[2];
- localAabbMax[0] = (scale.getX() <= 0.) ? tmpAabbMin[0] : tmpAabbMax[0];
- localAabbMax[1] = (scale.getY() <= 0.) ? tmpAabbMin[1] : tmpAabbMax[1];
- localAabbMax[2] = (scale.getZ() <= 0.) ? tmpAabbMin[2] : tmpAabbMax[2];
+ localAabbMin[0] = (scale.getX() >= 0.0) ? tmpAabbMin[0] : tmpAabbMax[0];
+ localAabbMin[1] = (scale.getY() >= 0.0) ? tmpAabbMin[1] : tmpAabbMax[1];
+ localAabbMin[2] = (scale.getZ() >= 0.0) ? tmpAabbMin[2] : tmpAabbMax[2];
+ localAabbMax[0] = (scale.getX() <= 0.0) ? tmpAabbMin[0] : tmpAabbMax[0];
+ localAabbMax[1] = (scale.getY() <= 0.0) ? tmpAabbMin[1] : tmpAabbMax[1];
+ localAabbMax[2] = (scale.getZ() <= 0.0) ? tmpAabbMin[2] : tmpAabbMax[2];
btVector3 localHalfExtents = btScalar(0.5)*(localAabbMax-localAabbMin);
btVector3 localCenter = btScalar(0.5)*(localAabbMax+localAabbMin);
diff --git a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp
index d1713462224..7db433b5b4f 100644
--- a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp
+++ b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp
@@ -393,7 +393,7 @@ void RAS_OpenGLRasterizer::FlushDebugShapes()
glBegin(GL_LINE_LOOP);
glColor4f(m_debugShapes[i].m_color[0],m_debugShapes[i].m_color[1],m_debugShapes[i].m_color[2],1.f);
- static const MT_Vector3 worldUp(0.,0.,1.);
+ static const MT_Vector3 worldUp(0.0, 0.0, 1.0);
MT_Vector3 norm = m_debugShapes[i].m_param;
MT_Matrix3x3 tr;
if (norm.fuzzyZero() || norm == worldUp)
@@ -414,7 +414,7 @@ void RAS_OpenGLRasterizer::FlushDebugShapes()
for (int j = 0; j<n; j++)
{
MT_Scalar theta = j*M_PI*2/n;
- MT_Vector3 pos(cos(theta)*rad, sin(theta)*rad, 0.);
+ MT_Vector3 pos(cos(theta) * rad, sin(theta) * rad, 0.0);
pos = pos*tr;
pos += m_debugShapes[i].m_pos;
const MT_Scalar* posPtr = &pos.x();
diff --git a/source/gameengine/SceneGraph/SG_BBox.cpp b/source/gameengine/SceneGraph/SG_BBox.cpp
index b1e3a3216ed..4b2fc5410fa 100644
--- a/source/gameengine/SceneGraph/SG_BBox.cpp
+++ b/source/gameengine/SceneGraph/SG_BBox.cpp
@@ -37,8 +37,8 @@
#include "SG_Node.h"
SG_BBox::SG_BBox() :
- m_min(0., 0., 0.),
- m_max(0., 0., 0.)
+ m_min(0.0, 0.0, 0.0),
+ m_max(0.0, 0.0, 0.0)
{
}
diff --git a/source/gameengine/SceneGraph/SG_BBox.h b/source/gameengine/SceneGraph/SG_BBox.h
index 5096d65558e..33e29b85a5f 100644
--- a/source/gameengine/SceneGraph/SG_BBox.h
+++ b/source/gameengine/SceneGraph/SG_BBox.h
@@ -81,7 +81,7 @@ public:
/**
* Scales the bounding box about the optional point.
*/
- void scale(const MT_Vector3 &size, const MT_Point3 &point = MT_Point3(0., 0., 0.));
+ void scale(const MT_Vector3 &size, const MT_Point3 &point = MT_Point3(0.0, 0.0, 0.0));
#endif
SG_BBox transform(const MT_Transform &world) const;
/**