Ignore:
Timestamp:
Mar 2, 2008, 1:58:48 AM (13 years ago)
Author:
Sam Hocevar
Message:
  • Fix argument types in lisp_cos(), lisp_sin() and lisp_atan() to avoid overflows. Closes #1 #2 #3.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • abuse/trunk/src/include/lisp2.hpp

    r39 r43  
    6262
    6363#define FIXED_TRIG_SIZE 360               // 360 degrees stored in table
    64 extern long sin_table[FIXED_TRIG_SIZE];   // this should be filled in by external module
     64extern int32_t sin_table[FIXED_TRIG_SIZE];   // this should be filled in by external module
    6565#define TBS 1662                          // atan table granularity
    66 extern unsigned short atan_table[TBS];
     66extern uint16_t atan_table[TBS];
    6767
    6868/* ------------------------- COMPATIBILITY -------------------- */
     
    111111char* symbol_name (void* symbol);
    112112int item_type (void* cell);
    113 long lisp_cos(long x);
    114 long lisp_sin(long x);
    115 long lisp_atan2(long dy, long dx);
     113int32_t lisp_cos(int32_t x);
     114int32_t lisp_sin(int32_t x);
     115int32_t lisp_atan2(int32_t dy, int32_t dx);
    116116void push_onto_list(Cell *object, Cell *&list);
    117117
Note: See TracChangeset for help on using the changeset viewer.