R.apex

  • Docs
  • Tutorials
Docs Menu
  • Func
  • R.Funcs
    • Conversion Funcs
    • Arithmetic Funcs
    • Logic Funcs
    • Relation Funcs
    • Function Funcs
    • Comparator Funcs
    • Condition Funcs
    • List Funcs
    • String Funcs
    • Map Funcs
    • Utility Funcs
    • Database Funcs
  • R.Instance
    • Creation Methods
    • Conversion Methods
    • Methods

Arithmetic Funcs Guide

Arithmetic Funcs in R

add

Add two numbers.

R.add.run(1, 2)
// 3

dec

Decrement the number.

R.dec.run(1)
// 0

divide

Divide two numbers.

R.divide.run(1, 2)
// 0.5

inc

Increment the number.

R.inc.run(1)
// 2

mod

Calculate the modulo.

R.mod.run(1, 2)
// 1

multiply

Multiply two numbers.

R.multiply.run(1, 2)
// 2

negate

Negate the number.

R.negate.run(1)
// -1

product

Multiply all the numbers.

R.product.run(1, 2, 3)
// 6

subtract

Subtract one number from another.

R.subtract.run(1, 2)
// -1

Contribute on Github! Edit this section.