mirror of
https://github.com/PaddiM8/kalker.git
synced 2025-03-01 14:51:13 +01:00
Fixed regular.rs compilation errors
This commit is contained in:
parent
41f8930024
commit
16673931a1
@ -88,7 +88,7 @@ macro_rules! as_number_or_return {
|
||||
if let KalkValue::Number(real, imaginary, unit) = $x {
|
||||
(
|
||||
real,
|
||||
if imaginary == -0 {
|
||||
if imaginary == -0f64 {
|
||||
float!(0)
|
||||
} else {
|
||||
imaginary
|
||||
|
@ -1,5 +1,5 @@
|
||||
pub mod special_funcs {
|
||||
use crate::{as_number_or_return, float, kalk_num::KalkValue};
|
||||
use crate::{as_number_or_return, float, kalk_value::KalkValue};
|
||||
|
||||
pub fn factorial(x: KalkValue) -> KalkValue {
|
||||
let (real, _, unit) = as_number_or_return!(x);
|
||||
@ -14,7 +14,7 @@ pub mod special_funcs {
|
||||
}
|
||||
|
||||
pub(crate) mod funcs {
|
||||
use crate::kalk_num::KalkValue;
|
||||
use crate::kalk_value::KalkValue;
|
||||
use crate::prelude::funcs::abs;
|
||||
use crate::{as_number_or_return, float};
|
||||
|
||||
@ -107,8 +107,8 @@ pub(crate) mod funcs {
|
||||
crate::prelude::funcs::sqrt(
|
||||
abs_x
|
||||
.clone()
|
||||
.mul_without_unit(abs_x)
|
||||
.add_without_unit(abs_y.clone().mul_without_unit(abs_y)),
|
||||
.mul_without_unit(&abs_x)
|
||||
.add_without_unit(&abs_y.clone().mul_without_unit(&abs_y)),
|
||||
)
|
||||
} else {
|
||||
KalkValue::Number(real.hypot(real_rhs), float!(0), unit)
|
||||
|
Loading…
Reference in New Issue
Block a user