How do I find out if the Math.JS library functions are available within the SN instances i'm on?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-16-2024 05:49 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-17-2024 09:28 AM - edited ‎12-17-2024 09:28 AM
You can do things like this:
var x = 9;
gs.info('Square Root: ' + Math.sqrt(x)); // 3
gs.info('Power: ' + Math.pow(x, 2)); // 81
gs.info('Random Number: ' + Math.random()); // Random number between 0 and 1
Is that what you mean? You can run the code above as a Background Script and also try other functions to see if they work as you are expecting them to.
--------------------------------------------------
If my response proves useful, please indicate its helpfulness by selecting "Accept as Solution" and " Helpful." This action benefits both the community and me. Thanks!
LinkedIn: https://www.linkedin.com/in/dalestubblefield/
YouTube: https://www.youtube.com/@starlordnow
--------------------------------------------------
Workflow Cowboy
LinkedIn: https://www.linkedin.com/in/dalestubblefield/
YouTube: https://www.youtube.com/@starlordnow