From 8a3994c5f6fd7023b5bdff9a02bc1f0ba110f12f Mon Sep 17 00:00:00 2001 From: Sam Anthony Date: Wed, 30 Oct 2024 19:27:46 -0400 Subject: cast scalar to vector --- balls.cl | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'balls.cl') 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) { -- cgit v1.2.3