aboutsummaryrefslogtreecommitdiff
path: root/azalea-core/src/math.rs
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2025-02-22 23:01:54 +0000
committermat <git@matdoes.dev>2025-02-22 23:01:54 +0000
commit34f53baf85fb5c7163ec5d71a8ab9d45d3f271b6 (patch)
tree7920fec1203e8e96463a142f5f6da6164e76e684 /azalea-core/src/math.rs
parentbdd2fc91e11e2896d8e1c7046df247e1075bd40d (diff)
downloadazalea-drasl-34f53baf85fb5c7163ec5d71a8ab9d45d3f271b6.tar.xz
update to rust edition 2024
Diffstat (limited to 'azalea-core/src/math.rs')
-rw-r--r--azalea-core/src/math.rs12
1 files changed, 2 insertions, 10 deletions
diff --git a/azalea-core/src/math.rs b/azalea-core/src/math.rs
index a763fc49..c09bddda 100644
--- a/azalea-core/src/math.rs
+++ b/azalea-core/src/math.rs
@@ -91,18 +91,10 @@ pub fn to_degrees(radians: f64) -> f64 {
///
/// This function exists because f64::signum doesn't check for 0.
pub fn sign(num: f64) -> f64 {
- if num == 0. {
- 0.
- } else {
- num.signum()
- }
+ if num == 0. { 0. } else { num.signum() }
}
pub fn sign_as_int(num: f64) -> i32 {
- if num == 0. {
- 0
- } else {
- num.signum() as i32
- }
+ if num == 0. { 0 } else { num.signum() as i32 }
}
#[cfg(test)]