en-us_products:mpino_studio2:box_functions:arithmetic:scale

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
en-us_products:mpino_studio2:box_functions:arithmetic:scale [2026/10/25 08:42] – external edit 127.0.0.1en-us_products:mpino_studio2:box_functions:arithmetic:scale [2026/11/13 00:27] (current) – external edit 127.0.0.1
Line 7: Line 7:
 ===== Behavior ===== ===== Behavior =====
  
-Linearly maps an integer from an input range to an integer output range. Values outside the input range are limited to the nearest boundary. If IN_MIN equals IN_MAX, the function stores OUT_MIN.+Linearly maps a value from the input range to the output range and stores it in the destination. If any of the six arguments is real (an ''R'' address or a decimal constant such as ''2.5''), the calculation uses real numbers; if all are integers, it uses integers. Values outside the input range are limited to the nearest boundary. If IN_MIN equals IN_MAX, the function stores OUT_MIN.
  
 ===== Syntax and Arguments ===== ===== Syntax and Arguments =====
Line 31: Line 31:
   * Make sure the result stays within the value range of the destination memory.   * Make sure the result stays within the value range of the destination memory.
   * If IN_MIN equals IN_MAX, OUT_MIN is stored. Check the minimum and maximum of the input range.   * If IN_MIN equals IN_MAX, OUT_MIN is stored. Check the minimum and maximum of the input range.
 +  * To keep the decimal part of the result, use an ''R'' address as the destination. If the destination is an integer address such as ''D'', the decimal part is discarded when the value is stored.
  
 ===== Box Functions in the Same Category ===== ===== Box Functions in the Same Category =====
en-us_products/mpino_studio2/box_functions/arithmetic/scale.1792885354.txt.gz · Last modified: by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki