Quantise a value to resolution

quantise

[n (number), resolution (positive_number)]

Round value to the nearest multiple of resolution.

Introduced in v2.1

Example 0 

quantise(10, 1)



# 10 is already a multiple of 1, so returns 10



Example 1 

quantise(10, 1.1)



# Returns 9.9 which is 1.1 * 9



Example 2 

quantise(13.3212, 0.1)



# 13.3



Example 3 

quantise(13.3212, 0.2)



# 13.4



Example 4 

quantise(13.3212, 0.3)



# 13.2



Example 5 

quantise(13.3212, 0.5)



# 13.5