User Tools

Site Tools


syntax:functions:rem

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
syntax:functions:rem [2021/07/31 20:31] craigtsyntax:functions:rem [2021/08/11 15:32] (current) – [Examples] craigt
Line 10: Line 10:
 ^Argument^Type^Description^ ^Argument^Type^Description^
 |dividend|Number|The value being divided.| |dividend|Number|The value being divided.|
-|divisor|Numbernon-zero|The value the //divident// is being divided by.|+|divisor|Number (non-zero)|The value the //divident// is being divided by.|
 \\  \\ 
 **Return value type:**  Number (Integer) **Return value type:**  Number (Integer)
Line 16: Line 16:
 \\  \\ 
 =====Remarks===== =====Remarks=====
-This function performs division much as the expression //dividend// / //divisor// would, except that only the __remainder__ of the division, if there is any, is returned as whole number.+This function performs division much as the expression //dividend// / //divisor// would, except that only the __remainder__ of the division, if there is any, is returned as whole number.
  
 \\  \\ 
 =====Examples===== =====Examples=====
  
-  div(12,4) +  rem(12,4) //Returns 0 
-  div(15,3) + 
-  div(21,5) = 1  //Remainder only returned as a whole number +  rem(15,3) //Returns 0 
-  div(-14,5) -4  //Remainder only returned as a whole number+ 
 +  rem(21,5) //Returns 1  (Remainder only returned as a whole number.) 
 + 
 +  rem(-14,5) //Returns -4  (Remainder only returned as a whole number.)
  
 \\  \\ 
 ===== See also ===== ===== See also =====
   * [[syntax:functions:div|Div(dividend, divisor)]]   * [[syntax:functions:div|Div(dividend, divisor)]]
syntax/functions/rem.txt · Last modified: 2021/08/11 15:32 by craigt

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki