mirror of
https://github.com/Smaug123/ray-tracing-fsharp
synced 2025-10-11 23:08:40 +00:00
Net6 and format (#8)
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user