mildew.stdlib.math

This module implements functions for the "Math" namespace in the scripting language. See https://pillager86.github.io/dmildew/Math.html

────────────────────────────────────────────────────────────────────────────────

Copyright (C) 2021 pillager86.rf.gd

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.

Members

Functions

CLZ1
uint CLZ1(uint x)

software implementation of CLZ32 because I don't know assembly nor care to lock DMildew to a specific CPU courtesy of https://embeddedgurus.com/state-space/2014/09/fast-deterministic-and-portable-counting-leading-zeros/

initializeMathLibrary
void initializeMathLibrary(Interpreter interpreter)

Initializes the math library. This is called by Interpreter.initializeStdlib. Functions are stored in the global Math object and are accessed such as "Math.acos". Documentation for this library can be found at https://pillager86.github.io/dmildew/Math.html

Meta