DecrementValue

Decrement the integer part of a number

Method Signature

DecrementValue(number=[numeric])

Arguments

Argument
Type
Required
Description
Default

number

numeric

true

The number to decrement the integer part of.

Examples

Decrement 7

Run Example

decrementValue( 7 );

Result: 6

Decrement 7.5

Run Example

decrementValue( 7.5 );

Result: 6.5

Additional Examples

Run Example

writeDump( decrementValue( 6 ) ); // 5
writeDump( decrementValue( 6.5 ) );
 // 5.5

Last updated

Was this helpful?