@@ -51,9 +51,9 @@ testEntryAndExitPoints (const Box3f& box)
51
51
for (int i = 0 ; i < 100000 ; ++i)
52
52
{
53
53
V3f p1 (
54
- random.nextf (box.max .x , box.min .x ),
55
- random.nextf (box.max .y , box.min .y ),
56
- random.nextf (box.max .z , box.min .z ));
54
+ float ( random.nextf (box.max .x , box.min .x ) ),
55
+ float ( random.nextf (box.max .y , box.min .y ) ),
56
+ float ( random.nextf (box.max .z , box.min .z ) ));
57
57
58
58
V3f p2 (p1 + hollowSphereRand<V3f> (random));
59
59
@@ -99,8 +99,8 @@ testEntryAndExitPoints (const Box3f& box)
99
99
// box, and it passes the box at a minimum distance of r1.
100
100
//
101
101
102
- const float r1 = 0.00001 ;
103
- const float r2 = 1.0 ;
102
+ const float r1 = 0 .00001f ;
103
+ const float r2 = 1 .0f ;
104
104
105
105
V3f p1 = box.min + r2 * hollowSphereRand<V3f> (random);
106
106
V3f p2;
@@ -142,19 +142,19 @@ testEntryAndExitPoints (const Box3f& box)
142
142
do
143
143
{
144
144
p1 = V3f (
145
- random.nextf (bigBox.min .x , bigBox.max .x ),
146
- random.nextf (bigBox.min .y , bigBox.max .y ),
147
- random.nextf (bigBox.min .z , bigBox.max .z ));
145
+ float ( random.nextf (bigBox.min .x , bigBox.max .x ) ),
146
+ float ( random.nextf (bigBox.min .y , bigBox.max .y ) ),
147
+ float ( random.nextf (bigBox.min .z , bigBox.max .z ) ));
148
148
} while (box.intersects (p1));
149
149
150
150
V3f p2;
151
151
152
152
do
153
153
{
154
154
p2 = V3f (
155
- random.nextf (box.min .x , box.max .x ),
156
- random.nextf (box.min .y , box.max .y ),
157
- random.nextf (box.min .z , box.max .z ));
155
+ float ( random.nextf (box.min .x , box.max .x ) ),
156
+ float ( random.nextf (box.min .y , box.max .y ) ),
157
+ float ( random.nextf (box.min .z , box.max .z ) ));
158
158
} while (approximatelyEqual (p1, p2, e));
159
159
160
160
Line3f ray (p1, p2);
@@ -423,9 +423,9 @@ testRayBoxIntersection (const Box3f& box)
423
423
for (int i = 0 ; i < 100000 ; ++i)
424
424
{
425
425
V3f p1 (
426
- random.nextf (box.max .x , box.min .x ),
427
- random.nextf (box.max .y , box.min .y ),
428
- random.nextf (box.max .z , box.min .z ));
426
+ float ( random.nextf (box.max .x , box.min .x ) ),
427
+ float ( random.nextf (box.max .y , box.min .y ) ),
428
+ float ( random.nextf (box.max .z , box.min .z ) ));
429
429
430
430
V3f p2 (p1 + hollowSphereRand<V3f> (random));
431
431
@@ -471,8 +471,8 @@ testRayBoxIntersection (const Box3f& box)
471
471
// box, and it passes the box at a minimum distance of r1.
472
472
//
473
473
474
- const float r1 = 0.00001 ;
475
- const float r2 = 1.0 ;
474
+ const float r1 = 0 .00001f ;
475
+ const float r2 = 1 .0f ;
476
476
477
477
V3f p1 = box.min + r2 * hollowSphereRand<V3f> (random);
478
478
V3f p2;
@@ -504,9 +504,9 @@ testRayBoxIntersection (const Box3f& box)
504
504
for (int i = 0 ; i < 1000 ; ++i)
505
505
{
506
506
V3f p1 (
507
- random.nextf (box.min .x , box.max .x ),
508
- random.nextf (box.min .y , box.max .y ),
509
- random.nextf (box.min .z , box.max .z ));
507
+ float ( random.nextf (box.min .x , box.max .x ) ),
508
+ float ( random.nextf (box.min .y , box.max .y ) ),
509
+ float ( random.nextf (box.min .z , box.max .z ) ));
510
510
511
511
V3f p2 (p1 + hollowSphereRand<V3f> (random));
512
512
@@ -531,19 +531,19 @@ testRayBoxIntersection (const Box3f& box)
531
531
do
532
532
{
533
533
p1 = V3f (
534
- random.nextf (bigBox.min .x , bigBox.max .x ),
535
- random.nextf (bigBox.min .y , bigBox.max .y ),
536
- random.nextf (bigBox.min .z , bigBox.max .z ));
534
+ float ( random.nextf (bigBox.min .x , bigBox.max .x ) ),
535
+ float ( random.nextf (bigBox.min .y , bigBox.max .y ) ),
536
+ float ( random.nextf (bigBox.min .z , bigBox.max .z ) ));
537
537
} while (box.intersects (p1));
538
538
539
539
V3f p2;
540
540
541
541
do
542
542
{
543
543
p2 = V3f (
544
- random.nextf (box.min .x , box.max .x ),
545
- random.nextf (box.min .y , box.max .y ),
546
- random.nextf (box.min .z , box.max .z ));
544
+ float ( random.nextf (box.min .x , box.max .x ) ),
545
+ float ( random.nextf (box.min .y , box.max .y ) ),
546
+ float ( random.nextf (box.min .z , box.max .z ) ));
547
547
} while (approximatelyEqual (p1, p2, e));
548
548
549
549
Line3f ray (p1, p2);
0 commit comments