Numbers

These puzzles provide means for various operations with numbers in your scenario.

Contents

Puzzles Reference

number

This universally used puzzle provides the means to supply some number to your Puzzles scenario.

Numbers can be written without decimals (integers) or with decimals (floating-point numbers). Extra large or extra small numbers can be written with scientific (exponent) notation.

angle

This puzzle allows you to visually define angle (in degrees).

arithmetic operation (with two inputs)

This puzzle allows you to perform elementary arithmetic operations: addition (+), subtraction (-), multiplication (×) and division (÷), as well as exponentiation (^).

Please note that floating-point arithmetic is not always 100% accurate, and may produce unpredictable results when comparing numeric values. To get rid of those precision issues, you may use rounding with precision.

arithmetic operation (with single input)

This puzzle allows you to perform the following mathematical operations: square root (√), absolute value aka modulus (|x|), sign change aka negation (-), natural logarithm (ln), decimal logarithm (log10), natural exponential function (e^), and power of ten (10^).

Examples:

Please note that floating-point arithmetic is not always 100% accurate, and may produce unpredictable results when comparing numeric values. To get rid of those precision issues, you may use rounding with precision.

round (to integer)

This puzzle rounds a specified number. The round variant rounds a number to the nearest integer: 2.49 will be rounded down (producing 2), and 2.5 will be rounded up (producing 3). The round up variant rounds a number upward to the nearest integer: 2.1 will be rounded up (producing 3). The round down variant rounds a number downward to the nearest integer: 2.9 will be rounded down (producing 2).

Examples:

round with precision

This puzzle rounds a given number using the specified precision.

Examples:

Floating-point arithmetic is not always 100% accurate, and may produce unpredictable results when comparing numeric values. To get rid of those precision issues, you may use rounding with precision as follows:

check

This puzzle checks whether a specified number is even, odd, prime, whole, positive, negative, or divisible by some other number. The result is true if this is the case and false if not. For using with Logic puzzles.

Examples:

clamp

This puzzle constraints a number to be between the specified limits (inclusive).

Examples:

random integer

This puzzle returns a random integer number between specified numbers (inclusive both limits).

Note: supplying non-integer limits is possible, although this extends the range as this puzzle performs some additional rounding under the hood.

Examples:

random fraction

This puzzle returns a random floating-point number between 0 (inclusive) and 1 (exclusive).

In the following example this puzzle is used to generate a random color for a material:

remainder

This puzzle finds the remainder after division of one number by another (aka the modulo operation).

Examples:

operations on list

Performs an operation on the numbers of a specified list.

Examples:

trigonometric functions

This puzzle allows you to calculate the values of the trigonometric functions sine (sin), cosine (cos), and tangent (tan), as well as the values of their inverse counterparts arcsine (asin), arccosine (acos), and arctangent (atan). The puzzle expects (or returns) values expressed in degrees.

Examples:

Please note that floating-point arithmetic is not always 100% accurate, and may produce unpredictable results when comparing numeric values. To get rid of those precision issues, you may use rounding with precision.

constants

This puzzle returns the following mathematical constants: pi (π), Euler's number e, the golden ratio (φ), square root of 2, square root of ½, and infinity value (∞).

Examples:

create vector

This puzzle returns a new three-dimensional vector which consists of the given X, Y, Z coordinates.

set vector value

This puzzle set the given value (x, y, z coordinate or length) for the given vector.

get vector value

This puzzle returns the given value taken from the given vector.

Returned values:

vector math

This puzzle performs a math operation between two vectors and returns a new vector.

Operations:

Having Troubles with Puzzles?

Seek help on the forums!