|
|
Line 1: |
Line 1: |
| __NOTOC__ | | __NOTOC__ |
− | <languages />
| |
| <!-- GIDEROSOBJ:math --> | | <!-- GIDEROSOBJ:math --> |
− | '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/> | + | '''Supported platforms:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/> |
− | '''<translate>Available since</translate>:''' Gideros 2011.6<br/> | + | '''Available since:''' Gideros 2011.6<br/> |
− | === <translate>Description</translate> === | + | |
− | <translate>[[Special:MyLanguage/math|math]] table holds most commonly used math functions and constants</translate>
| + | === Description === |
| + | '''math''' table holds most commonly used math functions and constants. |
| + | |
| {|- | | {|- |
| | style="width: 50%; vertical-align:top;"| | | | style="width: 50%; vertical-align:top;"| |
− | === <translate>Methods</translate> === | + | === Methods === |
− | [[Special:MyLanguage/math.abs|math.abs]] ''<translate>returns absolute value of v</translate>''<br/><!-- GIDEROSMTD:math.abs(v) returns absolute value of v --> | + | [[math.abs|math.abs]] ''returns absolute value of v''<br/><!-- GIDEROSMTD:math.abs(v) returns absolute value of v --> |
− | [[Special:MyLanguage/math.acos|math.acos]] ''<translate>returns arc cosine value of v in radians</translate>''<br/><!-- GIDEROSMTD:math.acos(v) returns arc cosine value of v in radians --> | + | [[math.acos|math.acos]] ''returns arc cosine value of v in radians''<br/><!-- GIDEROSMTD:math.acos(v) returns arc cosine value of v in radians --> |
− | [[Special:MyLanguage/math.asin|math.asin]] ''<translate>returns arc sine value of v in radians</translate>''<br/><!-- GIDEROSMTD:math.asin(v) returns arc sine value of v in radians --> | + | [[math.asin|math.asin]] ''returns arc sine value of v in radians''<br/><!-- GIDEROSMTD:math.asin(v) returns arc sine value of v in radians --> |
− | [[Special:MyLanguage/math.atan|math.atan]] ''<translate>returns arc tangent value of v in radians</translate>''<br/><!-- GIDEROSMTD:math.atan(v) returns arc tangent value of v in radians --> | + | [[math.atan|math.atan]] ''returns arc tangent value of v in radians''<br/><!-- GIDEROSMTD:math.atan(v) returns arc tangent value of v in radians --> |
− | [[Special:MyLanguage/math.atan2|math.atan2]] ''<translate>returns arc tangent value of v1/v2 in radians</translate>''<br/><!-- GIDEROSMTD:math.atan2(v1,v2) returns arc tangent value of v1/v2 in radians --> | + | [[math.atan2|math.atan2]] ''returns arc tangent value of v1/v2 in radians''<br/><!-- GIDEROSMTD:math.atan2(v1,v2) returns arc tangent value of v1/v2 in radians --> |
− | [[Special:MyLanguage/math.ceil|math.ceil]] ''<translate>returns smallest integer >= v</translate>''<br/><!-- GIDEROSMTD:math.ceil(v) returns smallest integer >= v --> | + | [[math.ceil|math.ceil]] ''returns smallest integer >= v''<br/><!-- GIDEROSMTD:math.ceil(v) returns smallest integer >= v --> |
− | [[Special:MyLanguage/math.cos|math.cos]] ''<translate>returns cosine value of angle rad</translate>''<br/><!-- GIDEROSMTD:math.cos(rad) returns cosine value of angle rad --> | + | [[math.cos|math.cos]] ''returns cosine value of angle rad''<br/><!-- GIDEROSMTD:math.cos(rad) returns cosine value of angle rad --> |
− | [[Special:MyLanguage/math.deg|math.deg]] ''<translate>returns angle in degrees of radians rad</translate>''<br/><!-- GIDEROSMTD:math.deg(rad) returns angle in degrees of radians rad --> | + | [[math.deg|math.deg]] ''returns angle in degrees of radians rad''<br/><!-- GIDEROSMTD:math.deg(rad) returns angle in degrees of radians rad --> |
− | [[Special:MyLanguage/math.exp|math.exp]] ''<translate>returns e^v</translate>''<br/><!-- GIDEROSMTD:math.exp(v) returns e^v --> | + | [[math.exp|math.exp]] ''returns e^v''<br/><!-- GIDEROSMTD:math.exp(v) returns e^v --> |
− | [[Special:MyLanguage/math.floor|math.floor]] ''<translate>returns largest integer <= v</translate>''<br/><!-- GIDEROSMTD:math.floor(v) returns largest integer <= v --> | + | [[math.floor|math.floor]] ''returns largest integer <= v''<br/><!-- GIDEROSMTD:math.floor(v) returns largest integer <= v --> |
− | [[Special:MyLanguage/math.fmod|math.fmod]] ''<translate>returns remainder of v1/v2 which is v1 - iV2 for some integer i</translate>''<br/><!-- GIDEROSMTD:math.fmod(v1,v2) returns remainder of v1/v2 which is v1 - iV2 for some integer i --> | + | [[math.fmod|math.fmod]] ''returns remainder of v1/v2 which is v1 - iV2 for some integer i''<br/><!-- GIDEROSMTD:math.fmod(v1,v2) returns remainder of v1/v2 which is v1 - iV2 for some integer i --> |
− | [[Special:MyLanguage/math.frexp|math.frexp]] ''<translate>returns mantissa [0.5,1- and exponent values of v</translate>''<br/><!-- GIDEROSMTD:math.frexp(v) returns mantissa [0.5,1- and exponent values of v --> | + | [[math.frexp|math.frexp]] ''returns mantissa [0.5,1- and exponent values of v''<br/><!-- GIDEROSMTD:math.frexp(v) returns mantissa [0.5,1- and exponent values of v --> |
− | [[Special:MyLanguage/math.ldexp|math.ldexp]] ''<translate>returns v1*2^v2</translate>''<br/><!-- GIDEROSMTD:math.ldexp(v1,v2) returns v1*2^v2 --> | + | [[math.ldexp|math.ldexp]] ''returns v1*2^v2''<br/><!-- GIDEROSMTD:math.ldexp(v1,v2) returns v1*2^v2 --> |
− | [[Special:MyLanguage/math.log|math.log]] ''<translate>returns natural logarithm of v</translate>''<br/><!-- GIDEROSMTD:math.log(v) returns natural logarithm of v --> | + | [[math.log|math.log]] ''returns natural logarithm of v''<br/><!-- GIDEROSMTD:math.log(v) returns natural logarithm of v --> |
− | [[Special:MyLanguage/math.log10|math.log10]] ''<translate>returns logarithm 10 of v</translate>''<br/><!-- GIDEROSMTD:math.log10(v) returns logarithm 10 of v --> | + | [[math.log10|math.log10]] ''returns logarithm 10 of v''<br/><!-- GIDEROSMTD:math.log10(v) returns logarithm 10 of v --> |
− | [[Special:MyLanguage/math.max|math.max]] ''<translate>returns maximum in a list of one or more values</translate>''<br/><!-- GIDEROSMTD:math.max(v1,...) returns maximum in a list of one or more values --> | + | [[math.max|math.max]] ''returns maximum in a list of one or more values''<br/><!-- GIDEROSMTD:math.max(v1,...) returns maximum in a list of one or more values --> |
− | [[Special:MyLanguage/math.min|math.min]] ''<translate>returns minimum in a list of one or more values</translate>''<br/><!-- GIDEROSMTD:math.min(v1,...) returns minimum in a list of one or more values --> | + | [[math.min|math.min]] ''returns minimum in a list of one or more values''<br/><!-- GIDEROSMTD:math.min(v1,...) returns minimum in a list of one or more values --> |
− | [[Special:MyLanguage/math.pow|math.pow]] ''<translate>returns v1 raised to the power of v2</translate>''<br/><!-- GIDEROSMTD:math.pow(v1,v2) returns v1 raised to the power of v2 --> | + | [[math.pow|math.pow]] ''returns v1 raised to the power of v2''<br/><!-- GIDEROSMTD:math.pow(v1,v2) returns v1 raised to the power of v2 --> |
− | [[Special:MyLanguage/math.rad|math.rad]] ''<translate>returns angle in radians of degrees deg</translate>''<br/><!-- GIDEROSMTD:math.rad(deg) returns angle in radians of degrees deg --> | + | [[math.rad|math.rad]] ''returns angle in radians of degrees deg''<br/><!-- GIDEROSMTD:math.rad(deg) returns angle in radians of degrees deg --> |
− | [[Special:MyLanguage/math.random|math.random]] ''<translate>returns random real [0,1-, integer [1,n] or real [1,u](with n=1-</translate>''<br/><!-- GIDEROSMTD:math.random(n,u) returns random real [0,1-, integer [1,n] or real [1,u](with n=1- --> | + | [[math.random|math.random]] ''returns random real [0,1-, integer [1,n] or real [1,u](with n=1-''<br/><!-- GIDEROSMTD:math.random(n,u) returns random real [0,1-, integer [1,n] or real [1,u](with n=1- --> |
− | [[Special:MyLanguage/math.randomseed|math.randomseed]] ''<translate>sets seed for pseudo-random number generator</translate>''<br/><!-- GIDEROSMTD:math.randomseed(seed) sets seed for pseudo-random number generator --> | + | [[math.randomseed|math.randomseed]] ''sets seed for pseudo-random number generator''<br/><!-- GIDEROSMTD:math.randomseed(seed) sets seed for pseudo-random number generator --> |
− | [[Special:MyLanguage/math.sin|math.sin]] ''<translate>returns sine value of angle rad</translate>''<br/><!-- GIDEROSMTD:math.sin(rad) returns sine value of angle rad --> | + | [[math.sin|math.sin]] ''returns sine value of angle rad''<br/><!-- GIDEROSMTD:math.sin(rad) returns sine value of angle rad --> |
− | [[Special:MyLanguage/math.sqrt|math.sqrt]] ''<translate>returns square root of v</translate>''<br/><!-- GIDEROSMTD:math.sqrt(v) returns square root of v --> | + | [[math.sqrt|math.sqrt]] ''returns square root of v''<br/><!-- GIDEROSMTD:math.sqrt(v) returns square root of v --> |
− | [[Special:MyLanguage/math.tan|math.tan]] ''<translate>returns tangent value of angle rad</translate>''<br/><!-- GIDEROSMTD:math.tan(rad) returns tangent value of angle rad --> | + | [[math.tan|math.tan]] ''returns tangent value of angle rad''<br/><!-- GIDEROSMTD:math.tan(rad) returns tangent value of angle rad --> |
| | style="width: 50%; vertical-align:top;"| | | | style="width: 50%; vertical-align:top;"| |
− | === <translate>Gideros specific methods</translate> ===
| |
− | [[Special:MyLanguage/math.length|math.length]] ''<translate>returns the length of a vector</translate>''<br/><!-- GIDEROSMTD:math.length(v) returns the length of a vector -->
| |
− | [[Special:MyLanguage/math.cross|math.cross]] ''<translate>returns the cross product of two vectors</translate>''<br/><!-- GIDEROSMTD:math.cross(v1,v2) returns the cross product of two vectors -->
| |
− | [[Special:MyLanguage/math.dot|math.dot]] ''<translate>returns the dot product of two vectors</translate>''<br/><!-- GIDEROSMTD:math.dot(v1,v2) returns the dot product of two vectors -->
| |
− | [[Special:MyLanguage/math.distance|math.distance]] ''<translate>returns the distance between two points</translate>''<br/><!-- GIDEROSMTD:math.distance(a,b) returns the distance between two points -->
| |
− | [[Special:MyLanguage/math.distances|math.distances]] ''<translate>returns the distances between a point and a set of points</translate>''<br/><!-- GIDEROSMTD:math.distances(point,point_list,order) returns the distances between a point and a set of points -->
| |
− | [[Special:MyLanguage/math.nearest|math.nearest]] ''<translate>returns the nearest point from a list</translate>''<br/><!-- GIDEROSMTD:math.nearest(point,point_list) returns the nearest point from a list -->
| |
− | [[Special:MyLanguage/math.normalize|math.normalize]] ''<translate>normalize a vector</translate>''<br/><!-- GIDEROSMTD:math.normalize(v) normalize a vector -->
| |
− | [[Special:MyLanguage/math.raycast|math.raycast]] ''<translate>returns intersections between a ray and a set of shapes</translate>''<br/><!-- GIDEROSMTD:math.raycast(origin,direction,shape) returns intersections between a ray and a set of shapes -->
| |
− | [[Special:MyLanguage/math.inside|math.inside]] ''<translate>returns wether a point is inside a shape</translate>''<br/><!-- GIDEROSMTD:math.inside(point,shape) returns wether a point is inside a shape -->
| |
− | [[Special:MyLanguage/math.edge|math.edge]] ''<translate>returns the nearest point on the edge of a shape</translate>''<br/><!-- GIDEROSMTD:math.edge(point,shape) returns the nearest point on the edge of a shape -->
| |
| | | |
− | === <translate>Events</translate> === | + | === Gideros specific methods === |
− | === <translate>Constants</translate> === | + | [[math.length|math.length]] ''returns the length of a vector''<br/><!-- GIDEROSMTD:math.length(v) returns the length of a vector --> |
− | [[Special:MyLanguage/huge|huge]]<br/><!-- GIDEROSCST:huge 1.#INF--> | + | [[math.cross|math.cross]] ''returns the cross product of two vectors''<br/><!-- GIDEROSMTD:math.cross(v1,v2) returns the cross product of two vectors --> |
− | [[Special:MyLanguage/pi|pi]]<br/><!-- GIDEROSCST:pi 3.1415926535898--> | + | [[math.dot|math.dot]] ''returns the dot product of two vectors''<br/><!-- GIDEROSMTD:math.dot(v1,v2) returns the dot product of two vectors --> |
| + | [[math.distance|math.distance]] ''returns the distance between two points''<br/><!-- GIDEROSMTD:math.distance(a,b) returns the distance between two points --> |
| + | [[math.distances|math.distances]] ''returns the distances between a point and a set of points''<br/><!-- GIDEROSMTD:math.distances(point,point_list,order) returns the distances between a point and a set of points --> |
| + | [[math.nearest|math.nearest]] ''returns the nearest point from a list''<br/><!-- GIDEROSMTD:math.nearest(point,point_list) returns the nearest point from a list --> |
| + | [[math.normalize|math.normalize]] ''normalize a vector''<br/><!-- GIDEROSMTD:math.normalize(v) normalize a vector --> |
| + | [[math.raycast|math.raycast]] ''returns intersections between a ray and a set of shapes''<br/><!-- GIDEROSMTD:math.raycast(origin,direction,shape) returns intersections between a ray and a set of shapes --> |
| + | [[math.inside|math.inside]] ''returns wether a point is inside a shape''<br/><!-- GIDEROSMTD:math.inside(point,shape) returns wether a point is inside a shape --> |
| + | [[math.edge|math.edge]] ''returns the nearest point on the edge of a shape''<br/><!-- GIDEROSMTD:math.edge(point,shape) returns the nearest point on the edge of a shape --> |
| + | |
| + | === Events === |
| + | === Constants === |
| + | [[huge|huge]]<br/><!-- GIDEROSCST:huge 1.#INF--> |
| + | [[pi|pi]]<br/><!-- GIDEROSCST:pi 3.1415926535898--> |
| |} | | |} |
| | | |
| {{GIDEROS IMPORTANT LINKS}} | | {{GIDEROS IMPORTANT LINKS}} |