removed math_util module

This commit is contained in:
MaxOhn
2021-11-13 17:20:26 +01:00
parent 8beabd4e11
commit d39d9ae426
6 changed files with 15 additions and 26 deletions
+5 -1
View File
@@ -765,7 +765,7 @@ impl Beatmap {
#[cfg(feature = "sliders")]
mod osu_fruits {
use crate::{math_util::is_linear, ParseError};
use crate::ParseError;
use super::Pos2;
@@ -869,6 +869,10 @@ mod osu_fruits {
}
}
fn is_linear(p0: Pos2, p1: Pos2, p2: Pos2) -> bool {
((p1.x - p0.x) * (p2.y - p0.y) - (p1.y - p0.y) * (p2.x - p0.x)).abs() <= f32::EPSILON
}
/// Control point for slider curve calculation
#[derive(Copy, Clone, Debug, Default, PartialEq)]
pub struct PathControlPoint {