mirror of
https://github.com/hannobraun/Fornjot
synced 2025-02-03 05:45:57 +00:00
Clean up imports
I don't think they are used often enough to justify them. Qualifying them where they're used also makes the code more clear.
This commit is contained in:
parent
708eaa33d3
commit
44ffc4fc26
@ -1,5 +1,3 @@
|
||||
use approx::AbsDiffEq;
|
||||
|
||||
use crate::math::{Point, Transform, Vector};
|
||||
|
||||
/// A line, defined by a point and a vector
|
||||
@ -59,8 +57,8 @@ impl Line {
|
||||
}
|
||||
}
|
||||
|
||||
impl AbsDiffEq for Line {
|
||||
type Epsilon = <f64 as AbsDiffEq>::Epsilon;
|
||||
impl approx::AbsDiffEq for Line {
|
||||
type Epsilon = <f64 as approx::AbsDiffEq>::Epsilon;
|
||||
|
||||
fn default_epsilon() -> Self::Epsilon {
|
||||
f64::default_epsilon()
|
||||
|
@ -1,7 +1,5 @@
|
||||
use std::ops;
|
||||
|
||||
use approx::AbsDiffEq;
|
||||
|
||||
use super::{Scalar, Vector};
|
||||
|
||||
/// An n-dimensional point
|
||||
@ -165,8 +163,8 @@ impl<const D: usize> ops::Mul<f64> for Point<D> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<const D: usize> AbsDiffEq for Point<D> {
|
||||
type Epsilon = <Vector<D> as AbsDiffEq>::Epsilon;
|
||||
impl<const D: usize> approx::AbsDiffEq for Point<D> {
|
||||
type Epsilon = <Vector<D> as approx::AbsDiffEq>::Epsilon;
|
||||
|
||||
fn default_epsilon() -> Self::Epsilon {
|
||||
f64::default_epsilon()
|
||||
|
@ -1,7 +1,5 @@
|
||||
use std::{cmp, f64::consts::PI, hash::Hash, ops};
|
||||
|
||||
use approx::AbsDiffEq;
|
||||
|
||||
/// A rational, finite scalar value
|
||||
///
|
||||
/// This is a wrapper around `f64`. On construction, it checks that the `f64`
|
||||
@ -272,8 +270,8 @@ impl num_traits::Signed for Scalar {
|
||||
}
|
||||
}
|
||||
|
||||
impl AbsDiffEq for Scalar {
|
||||
type Epsilon = <f64 as AbsDiffEq>::Epsilon;
|
||||
impl approx::AbsDiffEq for Scalar {
|
||||
type Epsilon = <f64 as approx::AbsDiffEq>::Epsilon;
|
||||
|
||||
fn default_epsilon() -> Self::Epsilon {
|
||||
f64::default_epsilon()
|
||||
|
@ -1,7 +1,5 @@
|
||||
use std::ops;
|
||||
|
||||
use approx::AbsDiffEq;
|
||||
|
||||
use super::Scalar;
|
||||
|
||||
/// An n-dimensional vector
|
||||
@ -168,8 +166,8 @@ impl<const D: usize> ops::Div<Scalar> for Vector<D> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<const D: usize> AbsDiffEq for Vector<D> {
|
||||
type Epsilon = <Scalar as AbsDiffEq>::Epsilon;
|
||||
impl<const D: usize> approx::AbsDiffEq for Vector<D> {
|
||||
type Epsilon = <Scalar as approx::AbsDiffEq>::Epsilon;
|
||||
|
||||
fn default_epsilon() -> Self::Epsilon {
|
||||
f64::default_epsilon()
|
||||
|
Loading…
Reference in New Issue
Block a user