[↑]
SmileBASIC4 Replica Reference
ARYOP
Perform a batch operation on elements in an array

ARYOP OperationType,ResultStorageArray,Parameter1,Parameter2[,Parameter3]

・From the beginning of the array to the end of the result storage array, the operation specified by the operation type is performed between each element, and the operation result is stored in the result storage array.
・If the number of elements in the parameter array is different from the number of elements in the result storage array, when it reaches the end of the array, return to the top of the array and refer to it repeatedly.

Argument

Operation type

0 #AOPADD Addition (p1+p2)
1 #AOPSUB Subtraction (p1-p2)
2 #AOPMUL Multiplication (p1*p2)
3 #AOPDIV Division (p1/p2)
4 #AOPMAD Sum of Products (p1*p2+p3)
5 #AOPLIP Linear Interpolation (p1*p3+p2*(1-p3))
6 #AOPCLP Clamp (Rounds the value of p1 within the range of p2<=x<=p3)

ResultStorageArray

Numeric array for storing operation results

Parameter1,Parameter2,Parameter3

Parameters 1, 2, and 3 can be specified as a numeric array or normal numeric value

・If a normal numerical value is specified, that numerical value is used for all element operations.

About this site
Our site is an unofficial manual site of programming software "SmileBASIC" for NintendoSwitch™.
I acquire the content of the site from the official reference site of the SmileBoom Co.Ltd. that is the development and sales cause of the software in real time (a minimum period of 24 hours update) and display it. For automatic update, contents may become improper.
Please confirm the correct content in an official site.

June 3, 2020
by mim
OK
|