Websites Navigation:
Airbit
|
Shop
|
m-shell.net
Languages:
EN
|
DE
Home
Download
Products
Make SIS
Documentation
Forum
Blog
Contact
Index
Module abutils
Generally useful simple functions in m.
Functions
contains
(rect, x, y)
Check whether a rectangle contains a point.
gcd
(a, b)
Compute the greatest common divisor of two numbers.
roundRect
(x, y, w, h, r)
Draw a rectangle with round corners.
sum
(a)
Compute the sum of numbers in an array.
function sum(a)
Compute the sum of numbers in an array.
Parameters:
a
– the array of numbers.
Returns:
the sum.
function gcd(a, b)
Compute the greatest common divisor of two numbers.
Parameters:
a
– the first number.
b
– the second number.
Returns:
the greatest common divisor of a and b
function contains(rect, x, y)
Check whether a rectangle contains a point.
Parameters:
rect
– the rectangle in the form [x, y, w, h].
x
– the x coordinate of the point.
y
– the y coordinate of the point.
Returns:
true if rect contains (x,y).
function roundRect(x, y, w, h, r)
Draw a rectangle with round corners.
Parameters:
x
– the x coordinate of the upper left corner.
y
– the y coordinate of the upper left corner.
w
– the width.
h
– the height.
r
– the radius of the rounded part.
mShell Home
>
Documentation
> mdoc