Mochaccino
Share
Explore

Math

Math in Mochaccino is supported, but not taken too seriously.
Basic Operations
Add, Subtract, Multiply, Divide, Modulus, Parentheses
You can use the +,-,*,/,% operators to perform the aforementioned operations on integers and doubles. On top of that, you can use parentheses for precedence.
Advanced Operations
For all other operations, you need to use the functions in the math module.
package main;
include math;
...
var x<int> = 10;
var y<double> = Math.pow(x, 2);
...
Share
 
Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.