sjbarag / brs

An interpreter for the BrightScript language that runs on non-Roku platforms.
MIT License
113 stars 43 forks source link

Implement global math functions #43

Closed sjbarag closed 6 years ago

sjbarag commented 6 years ago

The BrightScript language supports 17 global math functions:

We should get those implemented! Luckily they seem to all be wrappers around JavaScript's Math native functions, so these should be relatively easy to implement as native functions. Also luckily: they all operate on either Float or Int32, so we shouldn't have to worry about dealing with 64-bit integer math!

sjbarag commented 6 years ago

I've marked this as "Good first issue" because we have a pretty good pattern around global functions now. Also note that -- because this is a first issue -- a first-time contributor doesn't have to implement all of these at once. That's a pretty big undertaking. We can always split this into multiple issues to handle families of math functions (e.g. "all the trigonometry functions", etc.)

sjbarag commented 6 years ago

Closing in favor of https://github.com/sjbarag/brs/milestone/3 now that I've split this out