summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSam Anthony <sam@samanthony.xyz>2024-10-30 19:27:46 -0400
committerSam Anthony <sam@samanthony.xyz>2024-10-30 19:27:46 -0400
commit8a3994c5f6fd7023b5bdff9a02bc1f0ba110f12f (patch)
treef0d9d741a6beb13bdd4af58196c51296d421e684
parentb9d0dcbdf0d04e36d176c9eec0a733f403c65fb5 (diff)
downloadballs-8a3994c5f6fd7023b5bdff9a02bc1f0ba110f12f.zip
cast scalar to vector
-rw-r--r--balls.cl6
1 files changed, 2 insertions, 4 deletions
diff --git a/balls.cl b/balls.cl
index 41265b3..6d015fb 100644
--- a/balls.cl
+++ b/balls.cl
@@ -33,10 +33,8 @@ collideWalls(__global float2 *positions, __global float2 *velocities, __global f
r = radii[id];
/* Set bounds. */
- min.x = -1.0 + r + FLT_EPSILON;
- min.y = -1.0 + r + FLT_EPSILON;
- max.x = 1.0 - r - FLT_EPSILON;
- max.y = 1.0 - r - FLT_EPSILON;
+ min = -1.0f + r + FLT_EPSILON;
+ max = 1.0f - r - FLT_EPSILON;
/* Check for collision with bounds. */
if (p.x <= min.x || p.x >= max.x) {