ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / Numeric values functions / Math functions
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
RoundToMultiple (Function)
In french: ArrondiAuMultiple
Returns a numeric value rounded to the nearest multiple of another numeric value.
Example
RoundToMultiple(10, 9)
// returns 9
 
RoundToMultiple(-10, -3)
// Returns -9
 
RoundToMultiple(1.3, 0.2)
// Returns 1.4
 
RoundToMultiple(2.64, 0.25)
// Returns 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
Multiple to which you want to round.
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: wd290mat.dll
Minimum version required
  • Version 28
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 07/11/2022

Send a report | Local help