Net6 and format (#8)

This commit is contained in:
Patrick Stevens
2022-12-31 15:46:24 +00:00
committed by GitHub
parent 1bd62ade9b
commit f0ee86819b
36 changed files with 1742 additions and 613 deletions

View File

@@ -24,15 +24,8 @@ module Hittable =
/// Returns the distance we must walk along this ray before we first hit an object, the
/// colour the resulting light ray is after the interaction, and the new ray.
let hits
(ray : Ray)
(h : Hittable)
: float voption
=
let hits (ray : Ray) (h : Hittable) : float voption =
match h with
| UnboundedSphere s
| Sphere s ->
Sphere.firstIntersection s ray
| InfinitePlane plane ->
InfinitePlane.intersection plane ray
| Sphere s -> Sphere.firstIntersection s ray
| InfinitePlane plane -> InfinitePlane.intersection plane ray