Lameguy64 / PSn00bSDK

The most powerful open source SDK for the PS1 (as far as open source PS1 SDKs go). Not recommended for beginner use.
Other
819 stars 66 forks source link

Wrong documentation #61

Closed alextrevisan closed 1 year ago

alextrevisan commented 1 year ago
/**
 * @brief Gets sine of angle (fixed-point, high precision version)
 *
 * @details Returns the sine of angle a.
 *
 * @param a Angle in fixed-point format (131072 = 360 degrees)
 * @return Sine value in 20.12 fixed-point format (4096 = 1.0).
 */
int isin(int a);

I think this documentation is wrong, it is the same on hisin. I don't know the exact values to make a PR. In my tests it is 131072 for isin/icos and 131072<<5 for hisin and hicos. If this values are correct I can make a PR

spicyjpeg commented 1 year ago

You are indeed right. If I recall correctly the original documentation was unclear about these functions, so I just copypasted the comments around and then promptly forgot to fix them up before committing.

I'm going to update these as part of the upcoming PR, which I should be able to put together by next week. Feel free to open your own PR in the meantime (it's actually a good thing if you do because I'm otherwise inevitably going to forget about this).