Misc
Info
Dependencies:
- Floats
Implementation:
Misc.d on GitHub
The Misc package introduces various helper functions that did not fit into any other package.
Initialization
N/A
Constants
Misc package implements the phi constant
pi divided by 2 saved as an ikarus float. Decimal: 1.5707...
Functions
atan2f
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
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
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
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
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
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
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
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.