From dd8a32b1e1da584c000f32fb413364d053c04782 Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Fri, 5 Aug 2022 15:40:27 +0200 Subject: [PATCH] Make struct generic over dimensionality --- crates/fj-kernel/src/algorithms/ray_cast.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/crates/fj-kernel/src/algorithms/ray_cast.rs b/crates/fj-kernel/src/algorithms/ray_cast.rs index 4224eb9e0..89d9e6f51 100644 --- a/crates/fj-kernel/src/algorithms/ray_cast.rs +++ b/crates/fj-kernel/src/algorithms/ray_cast.rs @@ -6,12 +6,12 @@ use fj_math::{Point, Segment}; /// /// For in-kernel use, we don't need anything more flexible, and being exactly /// horizontal simplifies some calculations. -pub struct HorizontalRayToTheRight { +pub struct HorizontalRayToTheRight { /// The point where the ray originates - pub origin: Point<2>, + pub origin: Point, } -impl HorizontalRayToTheRight { +impl HorizontalRayToTheRight<2> { /// Determine whether the ray hits the given line segment pub fn hits_segment( &self, @@ -70,9 +70,9 @@ impl HorizontalRayToTheRight { } } -impl

From

for HorizontalRayToTheRight +impl From

for HorizontalRayToTheRight where - P: Into>, + P: Into>, { fn from(point: P) -> Self { Self {