An OFFICIAL Sifzz module that provides advanced math operations.
Place mathModule.py in your modules/ directory. The module will be automatically loaded when you run Sifzz.
Requirements: Python with the math standard library (included by default)
Calculates the sine of the given expression (in radians) and stores it in the specified variable.
Example:
set x to sin(3.14 / 2)
Calculates the cosine of the given expression (in radians) and stores it in the specified variable.
Example: ` set y to cos(0) `
Raises the base to the power of the exponent and stores the result in the specified variable.
Example: ` set result to power(2, 3) `
set angle to 1.5708
set sineValue to sin(angle)
say sineValue # Output: ~1.0
set a to 0
set b to cos(a)
set c to power(b, 3)
say c # Output: 1.0
set x to 0.5
set y to sin(x) + cos(x)
say y # Output: ~1.357
Module File: mathModule.py
Class Name: MathModule
Dependencies: math (Python standard library)
Version: 1.0
Status: Official
For more information on creating custom modules, see the Module Development Guide