Puppet Function: math::cube

Defined in:
functions/cube.pp
Function type:
Puppet Language

Summary

Cubes a number

Overview

math::cube(Numeric $value)Numeric
Note:

puppet has a integer size limit so some values may not work and return a Puppet::ParseError

Examples:

2

math::cube(2) => 8

3

math::cube(3) => 27

Parameters:

  • value (Numeric)

Returns:

  • (Numeric)


7
8
9
# File 'functions/cube.pp', line 7

function math::cube(Numeric $value) >> Numeric {
    $value * $value * $value
}