Skip to content

Commit 5af1fc3

Browse files
authored
ensure nbody epsilon is a float constant (#136)
1 parent 4365342 commit 5af1fc3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

samples/opengl/01_nbodygl/main.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ __kernel void nbody_step(
5757
const float G = 1.0f / numBodies;
5858
const float dampen = 0.90f;
5959
const float deltaTime = 0.005f;
60-
const float epsilon = 1e-3;
60+
const float epsilon = 1e-3f;
6161
6262
float3 myPos = pos[get_global_id(0)].xyz;
6363
float myMass = pos[get_global_id(0)].w;

samples/vulkan/01_nbodyvk/main.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ __kernel void nbody_step(
4848
const float G = 1.0f / numBodies;
4949
const float dampen = 0.90f;
5050
const float deltaTime = 0.005f;
51-
const float epsilon = 1e-3;
51+
const float epsilon = 1e-3f;
5252
5353
float3 myPos = pos[get_global_id(0)].xyz;
5454
float myMass = pos[get_global_id(0)].w;

0 commit comments

Comments
 (0)