ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Standard functions / Numeric values functions / Math functions
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
RoundToMultiple (Function)
In french: ArrondiAuMultiple
Returns a numeric value rounded to the nearest multiple of another numeric value.
New in version 2025
WEBDEV - Browser code This function is now available in browser code.
Example
RoundToMultiple(10, 9)
// Renvoie 9 

RoundToMultiple(-10, -3)
// Renvoie -9

RoundToMultiple(1.3, 0.2)
// Renvoie 1.4

RoundToMultiple(2.64, 0.25)
// Renvoie 2.75
Syntax
<Result> = RoundToMultiple(<Numeric value> , <Significance>)
<Result>: Variant
Value of <Numeric value> rounded to the nearest multiple of <Significance>.
<Numeric value>: Numeric
Numeric value to round.
<Significance>: Numeric
Value for which the nearest multiple is to be calculated.
Remarks
Rounding with the "Real" type is not accurate. Operations with the "Real" type are not precise because of the computer representation of real numbers. To get an exact rounding, it is recommended to use the Currency or Numeric types, which use an exact representation in memory. For more details, see Real type.
Component: wd300mat.dll
Minimum version required
  • Version 28
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 09/24/2024

Send a report | Local help