src/misc.h

changeset 188
4e686b771996
parent 185
6fea53f1ffc2
child 189
ac2d3e8dd110
equal deleted inserted replaced
187:ee42f4442566 188:4e686b771996
30 30
31 // Prime numbers 31 // Prime numbers
32 extern const ushort g_primes[NUM_PRIMES]; 32 extern const ushort g_primes[NUM_PRIMES];
33 33
34 // Returns whether a given string represents a floating point number. 34 // Returns whether a given string represents a floating point number.
35 bool isNumber (str& zToken); 35 bool isNumber (str& tok);
36 36
37 // Converts a float value to a string value. 37 // Converts a float value to a string value.
38 str ftoa (double fCoord); 38 str ftoa (double fCoord);
39 39
40 // Simplifies the given fraction. 40 // Simplifies the given fraction.
41 void simplify (short& dNum, short& dDenom); 41 void simplify (short& numer, short& denom);
42 42
43 // Grid stuff 43 // Grid stuff
44 typedef struct { 44 typedef struct {
45 const char* const name; 45 const char* const name;
46 floatconfig* const confs[4]; 46 floatconfig* const confs[4];
97 size_t size (); 97 size_t size ();
98 void rewind (); 98 void rewind ();
99 void seek (short amount, bool rel); 99 void seek (short amount, bool rel);
100 bool tokenCompare (short inPos, const char* sOther); 100 bool tokenCompare (short inPos, const char* sOther);
101 101
102 str operator[] (const size_t uIndex) { 102 str operator[] (const size_t idx) {
103 return m_tokens[uIndex]; 103 return m_tokens[idx];
104 } 104 }
105 105
106 private: 106 private:
107 std::vector<str> m_tokens; 107 std::vector<str> m_tokens;
108 short m_pos; 108 short m_pos;

mercurial