Changeset 795
- Timestamp:
- Apr 17, 2006, 3:11:33 PM (15 years ago)
- Location:
- libcaca/trunk
- Files:
-
- 1 deleted
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
libcaca/trunk/cpp/cucul++.cpp
r784 r795 195 195 } 196 196 197 unsigned int Cucul::sqrt (unsigned int v)198 {199 return cucul_sqrt(v);200 }201 202 197 Cucul::Sprite * Cucul::load_sprite (char const *f) 203 198 { -
libcaca/trunk/cpp/cucul++.h
r784 r795 89 89 void fill_triangle ( int, int, int, int, int, int, char const *); 90 90 int rand (int, int); 91 unsigned int sqrt (unsigned int);92 91 Sprite * load_sprite (char const *); 93 92 int get_sprite_frames (Cucul::Sprite const *); -
libcaca/trunk/cucul/Makefile.am
r790 r795 19 19 charset.c \ 20 20 colour.c \ 21 math.c \22 21 line.c \ 23 22 box.c \ -
libcaca/trunk/cucul/cucul.c
r790 r795 237 237 } 238 238 239 /** \brief Generate a random integer within a range. 240 * 241 * \param min The lower bound of the integer range. 242 * \param max The upper bound of the integer range. 243 * \return A random integer comprised between \p min and \p max, inclusive. 244 */ 245 int cucul_rand(int min, int max) 246 { 247 return min + (int)((1.0*(max-min+1)) * rand() / (RAND_MAX+1.0)); 248 } 249 239 250 /** \brief Export a canvas into a foreign format. 240 251 * -
libcaca/trunk/cucul/cucul.h
r778 r795 80 80 unsigned int cucul_get_height(cucul_t *); 81 81 void cucul_free(cucul_t *); 82 int cucul_rand(int, int); 82 83 /* @} */ 83 84 … … 142 143 void cucul_draw_thin_triangle(cucul_t *, int, int, int, int, int, int); 143 144 void cucul_fill_triangle(cucul_t *, int, int, int, int, int, int, char const *); 144 /* @} */145 146 /** \defgroup math Mathematical functions147 *148 * These functions provide a few useful math-related routines.149 *150 * @{ */151 int cucul_rand(int, int);152 unsigned int cucul_sqrt(unsigned int);153 145 /* @} */ 154 146
Note: See TracChangeset
for help on using the changeset viewer.