![]() |
RainbowBS Manual
v0.1.0
Written by QWQ([email protected])
|
conversion releted
convert digit to string | |
| enum | ePOW { SHEX, SBINARY, SDECIMAL } |
| Specific hex,binary or decimal. More... | |
| U8 | RBS_Number2String (U32 value, ePOW ePow, U8 length, char *pText) |
| Convert unsigned digit to ASCII string. More... | |
trigonometric releted | |
| int | RBS_sin (int angle) |
| Calculate sine. More... | |
| int | RBS_cos (int angle) |
| Calculate cosine. More... | |
| int | RBS_tan (int angle) |
| Calculate tangent. More... | |
| int | RBS_ctan (int angle) |
| Calculate cotangent. More... | |
| #define | ANG_45DEG 1024 |
| #define | ANG_90DEG (2*ANG_45DEG) |
| #define | ANG_135DEG (3*ANG_45DEG) |
| #define | ANG_180DEG (4*ANG_45DEG) |
| #define | ANG_225DEG (5*ANG_45DEG) |
| #define | ANG_270DEG (6*ANG_45DEG) |
| #define | ANG_315DEG (7*ANG_45DEG) |
| #define | ANG_360DEG (8*ANG_45DEG) |
Detailed Description
Enumeration Type Documentation
| enum ePOW |
Function Documentation
| int RBS_cos | ( | int | angle | ) |
This function calculates cosine without using float-point numbers.It use a constant table to look up for the appropriate value.
- Parameters
-
[in] angle angle=degrees*ANG_45DEG/45,degrees=angle*45/ANG_45DEG.
- Returns
- cos(degrees)*1024.
| int RBS_ctan | ( | int | angle | ) |
This function calculates cotangent without using float-point numbers.It use a constant table to look up for the appropriate value.
- Parameters
-
[in] angle angle=degrees*ANG_45DEG/45,degrees=angle*45/ANG_45DEG.
- Returns
- cotan(degrees)*1024.
| U8 RBS_Number2String | ( | U32 | value, |
| ePOW | ePow, | ||
| U8 | length, | ||
| char * | pText | ||
| ) |
- Parameters
-
[in] value unsigned digit. [in] ePow choose hex,binary or decimal. [in] length Max.bits from lowest bit.If Len is 0,choosing Min.characters automatically. [out] pText output string buffer.
- Returns
- character number.
- See also
- ePOW
| int RBS_sin | ( | int | angle | ) |
This function calculates sine without using float-point numbers. It use a constant table to look up for the approximate value.
- Parameters
-
[in] angle angle=degrees*ANG_45DEG/45,degrees=angle*45/ANG_45DEG.
- Returns
- sin(degrees)*1024.
Example:
| int RBS_tan | ( | int | angle | ) |
This function calculates tangent without using float-point numbers.It use a constant table to look up for the appropriate value.
- Parameters
-
[in] angle angle=degrees*ANG_45DEG/45,degrees=angle*45/ANG_45DEG.
- Returns
- tan(degrees)*1024.
Generated by
1.8.9.1
