aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe-php-shim/src/math.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/shirabe-php-shim/src/math.rs')
-rw-r--r--crates/shirabe-php-shim/src/math.rs24
1 files changed, 0 insertions, 24 deletions
diff --git a/crates/shirabe-php-shim/src/math.rs b/crates/shirabe-php-shim/src/math.rs
index ee9a76d..0d9090b 100644
--- a/crates/shirabe-php-shim/src/math.rs
+++ b/crates/shirabe-php-shim/src/math.rs
@@ -1,30 +1,6 @@
-pub fn max(a: i64, b: i64) -> i64 {
- a.max(b)
-}
-
-pub fn min(a: i64, b: i64) -> i64 {
- a.min(b)
-}
-
-pub fn abs(v: i64) -> i64 {
- v.abs()
-}
-
-pub fn floor(v: f64) -> f64 {
- v.floor()
-}
-
-pub fn ceil(v: f64) -> f64 {
- v.ceil()
-}
-
pub fn round(v: f64, precision: i64) -> f64 {
// PHP's default mode is PHP_ROUND_HALF_UP (round half away from zero),
// which matches Rust's f64::round.
let factor = 10f64.powi(precision as i32);
(v * factor).round() / factor
}
-
-pub fn intdiv(a: i64, b: i64) -> i64 {
- a / b
-}