benchmark.raytracer: replace hard-coded constant with self-documenting code
parent
10297b66ce
commit
c719b92363
|
@ -2,9 +2,9 @@
|
||||||
! http://www.ffconsultancy.com/free/ray_tracer/languages.html
|
! http://www.ffconsultancy.com/free/ray_tracer/languages.html
|
||||||
|
|
||||||
USING: arrays accessors specialized-arrays.double io io.files
|
USING: arrays accessors specialized-arrays.double io io.files
|
||||||
io.files.temp io.encodings.binary kernel math math.functions
|
io.files.temp io.encodings.binary kernel math math.constants
|
||||||
math.vectors math.parser make sequences sequences.private words
|
math.functions math.vectors math.parser make sequences
|
||||||
hints ;
|
sequences.private words hints ;
|
||||||
IN: benchmark.raytracer
|
IN: benchmark.raytracer
|
||||||
|
|
||||||
! parameters
|
! parameters
|
||||||
|
@ -23,7 +23,7 @@ CONSTANT: levels 3
|
||||||
|
|
||||||
CONSTANT: size 200
|
CONSTANT: size 200
|
||||||
|
|
||||||
CONSTANT: delta 1.4901161193847656E-8
|
: delta ( -- n ) epsilon sqrt ; inline
|
||||||
|
|
||||||
TUPLE: ray { orig double-array read-only } { dir double-array read-only } ;
|
TUPLE: ray { orig double-array read-only } { dir double-array read-only } ;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue