UUDigitalHumanitieslab / microcontact

Web application for the Microcontact project lead by Roberta d'Alessandro
0 stars 1 forks source link

Spurious assertion failure in client/script/view/contributionPie.coffee #151

Open jgonggrijp opened 5 years ago

jgonggrijp commented 5 years ago

The following assertion fails on some larger pies because of rounding differences. The tested value is not exactly 1, but (for example) 0.99896 or 1.004721. Which is definitely close enough, but the assertion doesn't reflect this yet.

https://github.com/UUDigitalHumanitieslab/microcontact/blob/0745026e36090568c5b33b165525bcc2acb34366/client/script/view/contributionPie.coffee#L42

Change to an assertion that the value is close to 1.