Ray-casting algorithm: Difference between revisions
Content added Content deleted
(add Ada) |
|||
Line 1,000: | Line 1,000: | ||
(s.y +. _eps) < (min a.y b.y) || |
(s.y +. _eps) < (min a.y b.y) || |
||
s.x > (max a.x b.x) then (false) |
s.x > (max a.x b.x) then (false) |
||
⚫ | |||
else |
else |
||
⚫ | |||
else begin |
|||
let ca = if a.x <> b.x then (coeff_ang a b) else (huge_val) in |
let ca = if a.x <> b.x then (coeff_ang a b) else (huge_val) in |
||
let my = min_y ~a ~b in |
let my = min_y ~a ~b in |
||
let cp = if (s.x -. my.x) <> 0.0 then (coeff_ang my s) else (huge_val) in |
let cp = if (s.x -. my.x) <> 0.0 then (coeff_ang my s) else (huge_val) in |
||
(cp >= ca) |
|||
end |
|||
;; |
;; |
||