I need to use math.js to solve a system of equations but I honestly have no clue on how to add the math.js library to the browser editor for p5js. I have already tried creating a new sketch file and copying over the html stuff from the math.js website but that didn’t end up correct and I still can’t use any of it because math is still undefined. I desperately need help with this.
I’m somewhat new to this but I just tried to do what you described.
So, I added math.js to index.html by doing this in the head:
` <script src="https://cdnjs.cloudflare.com/ajax/libs/mathjs/10.1.1/math.js" integrity="sha512-0MC8WeRWoyA1u5N3ssCsJDSbNfw3bjF65BIQ3UTPs9nwaV0fy+JN3FH9PQmYACZOEkQFhUvEP+jIqwOlBjEM9w==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>`
And then I tested it by doing this in the body:
It seemed to work.
Please enjoy the discussions here. It’s great to see that you have both just recently arrived to post for the first time, and have already solved a problem!
Welcome! Here is a sketch on the p5 Editor that includes math.js and KaTeX for rendering.