mirror of
https://github.com/neocities/neocities.git
synced 2025-07-25 11:58:28 +02:00
calculate the real revenue on stats after credit card fees
This commit is contained in:
parent
fbee506f88
commit
41c4a5a1ef
2 changed files with 17 additions and 1 deletions
13
ext/float.rb
Normal file
13
ext/float.rb
Normal file
|
@ -0,0 +1,13 @@
|
|||
class Float
|
||||
def round_to(x)
|
||||
(self * 10**x).round.to_f / 10**x
|
||||
end
|
||||
|
||||
def ceil_to(x)
|
||||
(self * 10**x).ceil.to_f / 10**x
|
||||
end
|
||||
|
||||
def floor_to(x)
|
||||
(self * 10**x).floor.to_f / 10**x
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue