Puppet Function: math::square

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

Summary

Squares a number

Overview

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

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

Examples:

2

math::square(2) => 4

3

math::square(3) => 9

Parameters:

  • value (Numeric)

Returns:

  • (Numeric)


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

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