lukew3 / mathgenerator

A math problem generator, created for the purpose of giving self-studying students and teaching organizations the means to easily get access to high-quality, generated math problems to suit their needs.
https://lukew3.github.io/mathgenerator
MIT License
690 stars 178 forks source link

Area of Triangle produces invalid triangles #393

Closed rolfvandekrol closed 1 year ago

rolfvandekrol commented 1 year ago

Bug Description

The 'Area of Triangle' generator came up with the triangle 17 19 1 (or in a different order, i'm not sure), which is of course not a real triangle. The answer, according to the generator was some answer involving j, but it seems like a bug to me that this generator make non-real triangles.

rolfvandekrol commented 1 year ago

I don't know the details of how the generators work, but a test to know if the triangle is real might be: add up the two lowest numbers, if the result is lower than the remaining (highest) number, it's not a real triangle.

jsun1590 commented 1 year ago

Hi there, I believe this was fixed around a year ago in Pull 361. I just tested and the function seems to work as expected locally. I had a look at the gh-pages branch and it just appears that the statically generated data there is not updated.

lukew3 commented 1 year ago

Hi there, I believe this was fixed around a year ago in Pull 361. I just tested and the function seems to work as expected locally. I had a look at the gh-pages branch and it just appears that the statically generated data there is not updated.

Thanks, I thought this might be the case. #394 will prevent this from occurring in the future.

rolfvandekrol commented 1 year ago

Screenshot 2022-12-19 at 08 57 49

Well, currently, this still happens on the github pages site.

rolfvandekrol commented 1 year ago

Ah, I misread the #394 . It's not a merged PR, but an issue to fix :)