From 4e4beef8b76e9c9c0d9c2271058f082682b3f917 Mon Sep 17 00:00:00 2001 From: uz Date: Fri, 30 Oct 2009 14:02:24 +0000 Subject: [PATCH] Fixed the return types of the sine/cosine functions. Added comments. git-svn-id: svn://svn.cc65.org/cc65/trunk@4402 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- include/cc65.h | 4 ++-- libsrc/common/cc65_sincos.s | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/include/cc65.h b/include/cc65.h index 557fd7fe6..8a5550803 100644 --- a/include/cc65.h +++ b/include/cc65.h @@ -44,12 +44,12 @@ -extern unsigned __fastcall__ cc65_sin (unsigned x); +extern int __fastcall__ cc65_sin (unsigned x); /* Return the sine of the argument, which must be in range 0..360. The result * is in 8.8 fixed point format, which means that 1.0 = $100 and -1.0 = $FF00. */ -extern unsigned __fastcall__ cc65_cos (unsigned x); +extern int __fastcall__ cc65_cos (unsigned x); /* Return the cosine of the argument, which must be in range 0..360. The result * is in 8.8 fixed point format, which means that 1.0 = $100 and -1.0 = $FF00. */ diff --git a/libsrc/common/cc65_sincos.s b/libsrc/common/cc65_sincos.s index d0b108297..6baba8bb3 100644 --- a/libsrc/common/cc65_sincos.s +++ b/libsrc/common/cc65_sincos.s @@ -1,6 +1,9 @@ ; ; Fixed point cosine/sine functions. ; +; int __fastcall__ cc65_sin (unsigned x); +; int __fastcall__ cc65_cos (unsigned x); +; ; Returns the cosine/sine for the given argument as angular degree. ; Valid argument range is 0..360 for both functions. They will return ; garbage if the argument is not in a valid range. Result is in 8.8 fixed