aboutsummaryrefslogtreecommitdiff
path: root/src/math/surface.rs
diff options
context:
space:
mode:
authorArne Dußin2021-01-17 14:19:59 +0100
committerArne Dußin2021-01-17 14:19:59 +0100
commitb019d10df4080fdb0ab57445040d24f9b14abdac (patch)
tree268305b1024f8a15a88eb72f593fcfab0f0e8d61 /src/math/surface.rs
parentb58e965327deef14d6414a912bb6698c6f745ce9 (diff)
parent51b7747e62c189d430318c67368a5c84e50ece61 (diff)
downloadgraf_karto-b019d10df4080fdb0ab57445040d24f9b14abdac.tar.gz
graf_karto-b019d10df4080fdb0ab57445040d24f9b14abdac.zip
Merge branch 'master' into net
Diffstat (limited to 'src/math/surface.rs')
-rw-r--r--src/math/surface.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/math/surface.rs b/src/math/surface.rs
index 088ac47..21c3865 100644
--- a/src/math/surface.rs
+++ b/src/math/surface.rs
@@ -2,7 +2,7 @@
use super::{LineSegment, Polygon, Rect, Vec2};
use float_cmp::ApproxEq;
-use nalgebra::RealField;
+use nalgebra::{RealField, Scalar};
/// Trait that describes an area in the vector space on the field of T, with T unable to be
/// used without rounding.
@@ -28,7 +28,7 @@ where
}
/// The same as Surface, but the vector space will be assumed to be perfectly divideable or checkable.
-pub trait ExactSurface<T: RealField> {
+pub trait ExactSurface<T: Scalar + Copy> {
/// Checks if a point lies on this surface.
fn contains_point(&self, point: &Vec2<T>) -> bool;