Logged in as Nobody

Vote for Us

Epitaph Help


Concepts Creator Commands Creator Tutorials Games Innate Commands Known Commands
Lord Npc Objects Playtesters Rooms Rules



maths <calculation>


The maths command does arithmetic for you, cos maths is hard!

This command understands addition (+), subtraction (-), multiplication (*) and division (/). The normal order of operations is used, ie, multiplication and division, then addition and subtraction. Parentheses may be used to force things to be evaluated before other things. There are also a number of mathematical functions included, as follows:

sin( x ) The sine of the angle x, in radians.
cos( x ) The cosine of the angle x, in radians.
tan( x ) The tangent of the angle x, in radians.
asin( x ) The arcsine of a number x between -1 and 1.
acos( x ) The arccosine of a number x between -1 and 1.
atan( x ) The arctangent of a number x.
sqrt( x ) The square root of the number x.
floor( x ) The greatest integer lower than x.
ceil( x ) The lowest integer greater than x.
round( x ) The integer closest to x.
pow( x, y ) x to the power of y.
exp( x ) e to the power of x.
log( x ) The natural logarithm of x.


> maths 2 + 3 * 4 + 5

> maths (2 + 3) * (4 + 5) 45.000000

Syntax Forms

mat_hs <expression> 
Copyright Statement

Epitaph - Epiphany v1.2.13 [release]. Copyright © Imaginary Realities Ltd 2009 -