mirror of
https://github.com/hannobraun/Fornjot
synced 2025-10-24 08:48:04 +00:00
Use more appropriate types
This commit is contained in:
parent
93f1f173a7
commit
0bc3f8dd4a
@ -83,10 +83,10 @@ impl CurveGeometry for Circle {
|
||||
|
||||
let mut curvature = Vec::new();
|
||||
|
||||
let mut t = increment.snap_to_multiple(min.t) + increment.inner.t;
|
||||
while t <= increment.snap_to_multiple(max.t) {
|
||||
curvature.push(Point::from([t]));
|
||||
t += increment.inner.t;
|
||||
let mut t = increment.snap_to_multiple(min) + increment.inner;
|
||||
while t <= increment.snap_to_multiple(max) {
|
||||
curvature.push(t);
|
||||
t += increment.inner;
|
||||
}
|
||||
|
||||
if direction.is_negative() {
|
||||
|
||||
@ -158,8 +158,8 @@ pub struct Increment {
|
||||
}
|
||||
|
||||
impl Increment {
|
||||
pub fn snap_to_multiple(&self, t: Scalar) -> Scalar {
|
||||
(t / self.inner.t).floor() * self.inner.t
|
||||
pub fn snap_to_multiple(&self, point: Point<1>) -> Point<1> {
|
||||
(point / self.inner).floor() * self.inner
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user