Skip to content

fix: 204 ratio is NaN when previous value is 0#222

Merged
ktrz merged 3 commits intomasterfrom
fix/204-ratio-is-nan-when-prev-value-is-zero
Jan 31, 2024
Merged

fix: 204 ratio is NaN when previous value is 0#222
ktrz merged 3 commits intomasterfrom
fix/204-ratio-is-nan-when-prev-value-is-zero

Conversation

@ktrz
Copy link
Member

@ktrz ktrz commented Jan 30, 2024

  • extract getRatio function
  • print 1 when both values are 0
  • print +-∞ when divisor is 0

fixes #204

* extract getRatio function
* print 1 when both values are 0
* print +-∞ when divisor is 0
ningziwen
ningziwen previously approved these changes Jan 31, 2024
@ktrz ktrz merged commit e108afd into master Jan 31, 2024
@ktrz ktrz deleted the fix/204-ratio-is-nan-when-prev-value-is-zero branch January 31, 2024 14:01
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.

NaN is given as ratio when the previous value is 0

3 participants