Main Page | Modules | Class Hierarchy | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

Integer Math Library


Files

file  otIntMath.h
 Integer Math Library.

Modules

 Version History

Functions

int isin (int ix)
 Compute sine. Returns the sine of an angle of x degree.
int icos (int ix)
 Compute cosine. Returns the cosine of an angle of x degree.
int itan (int ix)
 Compute tangent. Returns the tangent of an angle of x degree.
int iasin (int y, int hyp)
 Returns the principal value of the arc sine of y, expressed in degree. In trigonometrics, arc sine is the inverse operation of sine.
int iacos (int x, int hyp)
 Returns the principal value of the arc cosine of x, expressed in degree. In trigonometrics, arc cosine is the inverse operation of cosine.
int iatan (int y, int x)
 Compute arc tangent with two parameters. Returns the principal value of the arc tangent of y/x, expressed in degree. To compute the value, the function takes into account the sign of both arguments in order to determine the quadrant.
unsigned int isqrt (unsigned int val)
 Compute square root.

Detailed Description

For applications where high accuracy of the trigonometric functions is not required, this version based on integers (base 10000) can be used, which however offers a much higher execution speed

Function Documentation

int iacos (  int  x,
int  hyp
) 
 

Parameters:
x Value whose arc cosine is computed.
hyp Radius of the trigonometric circle (0:10000)
Returns:
Principal arc cosine of x

int iasin (  int  y,
int  hyp
) 
 

Parameters:
y Value whose arc sine is computed.
hyp Radius of the trigonometric circle (0:10000)
Returns:
Principal arc sine of y

int iatan (  int  y,
int  x
) 
 

Parameters:
y Value representing the proportion of the y-coordinate.
x Value representing the proportion of the x-coordinate.
Returns:
Principal arc tangent of y/x.

int icos (  int  ix  ) 
 

Parameters:
ix Value representing an angle expressed in degree.
Returns:
Cosine of x degree (0:10000).

int isin (  int  ix  ) 
 

Parameters:
ix Value representing an angle expressed in degree.
Returns:
Sine of x degree (0:10000).

unsigned int isqrt (  unsigned int  val  ) 
 

Parameters:
val Value whose square root is computed.
Returns:
Square root of x.

int itan (  int  ix  ) 
 

Parameters:
ix Value representing an angle expressed in degree.
Returns:
Tangent of x degree (0:10000).
footer

otStudio - Library Reference - (C) 2020-25 Officina Turini, All Rights Reserved
Document built with Doxygen 1.4.0