Misc
The Misc package introduces various helper functions that did not fit into any other package.
Dependencies
Initialization
N/A
Implementation
Constants
Misc package implements the phi
constant
pi
divided by 2 saved as an ikarus float. Decimal: 1.5707...
Functions
atan2f
Calculates the arcus tangent of an angle between the origin and (x, y) point.
var int x
X-coordinatevar int y
Y-coordinate
Return value
The function returns arcus tangent in radians as Ikarus float
.
sin
Calculates the sine of an angle given in radians.
var int angle
The angle in radians as a Ikarusfloat
Return value
The function returns sine of the angle as Ikarus float
.
cos
Calculates the cosine of an angle given in radians.
var int angle
The angle in radians as a Ikarusfloat
Return value
The function returns cosine of the angle as Ikarus float
.
tan
Calculates the tangent of an angle given in radians.
var int angle
The angle in radians as a Ikarusfloat
Return value
The function returns tangent of the angle as Ikarus float
.
asin
Calculates the arcus sine.
var int sine
The sine of an angle as a Ikarusfloat
Return value
The function returns arcus sine of the angle as Ikarus float
.
acos
Calculates the arcus cosine
var int cosine
The cosine of an angle as a Ikarusfloat
Return value
The function returns arcus cosine of the angle as Ikarus float
.
distance2D
Calculates the distance between two points on a two-dimensional plane.
var int x1
X-coordinate of the first pointvar int x2
X-coordinate of the second pointvar int y1
Y-coordinate of the first pointvar int y2
Y-coordinate of the second point
Return value
The function returns the distance between the two points.
distance2Df
Calculates the distance between two points on a two-dimensional plane but parameters and return values are Ikarus floats
.
var int x1
X-coordinate of the first pointvar int x2
X-coordinate of the second pointvar int y1
Y-coordinate of the first pointvar int y2
Y-coordinate of the second point
Return value
The function returns the distance between the two points as Ikarus float
.