Skip to content

Commit

Permalink
improved visibility
Browse files Browse the repository at this point in the history
  • Loading branch information
DrunkRandomWalker committed Oct 26, 2023
1 parent 57ee5f5 commit 84c4bd0
Show file tree
Hide file tree
Showing 7 changed files with 76 additions and 1,075 deletions.
8 changes: 4 additions & 4 deletions packages/injective-math/src/fp_decimal/arithmetic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use std::iter;
use std::ops;

impl FPDecimal {
pub fn _add(x: FPDecimal, y: FPDecimal) -> FPDecimal {
pub(crate) fn _add(x: FPDecimal, y: FPDecimal) -> FPDecimal {
if x.sign == y.sign {
return FPDecimal {
num: x.num + y.num,
Expand Down Expand Up @@ -34,7 +34,7 @@ impl FPDecimal {
FPDecimal::_add(*self, FPDecimal::from(other))
}

pub fn _sub(x: FPDecimal, y: FPDecimal) -> FPDecimal {
pub(crate) fn _sub(x: FPDecimal, y: FPDecimal) -> FPDecimal {
let neg_y = FPDecimal {
num: y.num,
sign: 1 - y.sign,
Expand All @@ -46,7 +46,7 @@ impl FPDecimal {
FPDecimal::_sub(*self, FPDecimal::from(other))
}

pub fn _mul(x: FPDecimal, y: FPDecimal) -> FPDecimal {
pub(crate) fn _mul(x: FPDecimal, y: FPDecimal) -> FPDecimal {
let mut sign = 1;
if x.sign != y.sign {
sign = 0;
Expand Down Expand Up @@ -74,7 +74,7 @@ impl FPDecimal {
FPDecimal::_mul(*self, FPDecimal::from(other))
}

pub fn _div(x: FPDecimal, y: FPDecimal) -> FPDecimal {
pub(crate) fn _div(x: FPDecimal, y: FPDecimal) -> FPDecimal {
if y == FPDecimal::ONE {
return x;
}
Expand Down
Loading

0 comments on commit 84c4bd0

Please sign in to comment.