mirror of
https://github.com/nArnoSNES/tcc-65816.git
synced 2024-06-12 13:29:29 +00:00
17 lines
310 B
C
17 lines
310 B
C
int abs(int j);
|
|
extern void abort(void);
|
|
|
|
__attribute__((noinline)) int lisp_atan2(long dy, long dx) {
|
|
if (dx <= 0)
|
|
if (dy > 0)
|
|
return abs(dx) <= abs(dy);
|
|
return 0;
|
|
}
|
|
|
|
int main() {
|
|
volatile long dy = 63, dx = -77;
|
|
if (lisp_atan2(dy, dx))
|
|
abort();
|
|
return 0;
|
|
}
|