Skip to content

fix(allocate): correct allocation with a zero ratio item#5

Open
dotpack wants to merge 1 commit intomacor161:masterfrom
dotpack:master
Open

fix(allocate): correct allocation with a zero ratio item#5
dotpack wants to merge 1 commit intomacor161:masterfrom
dotpack:master

Conversation

@dotpack
Copy link
Copy Markdown

@dotpack dotpack commented Jan 29, 2021

const results = new Money(29900, Money.EUR).allocate([265.09, 0, 33.91]).map(money => money.toDecimal());
// returns [265.09, 0.01, 33.9] instead of [265.09, 0.00, 33.91]

@macor161 macor161 self-requested a review January 29, 2021 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant