Changeset 795


Ignore:
Timestamp:
Apr 17, 2006, 3:11:33 PM (15 years ago)
Author:
Sam Hocevar
Message:
  • Removed math.c from cucul, it's beyond uselessness. Kept cucul_rand in cucul.c just in case.
Location:
libcaca/trunk
Files:
1 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/cpp/cucul++.cpp

    r784 r795  
    195195}
    196196
    197 unsigned int    Cucul::sqrt (unsigned int v)
    198 {
    199     return cucul_sqrt(v);
    200 }
    201 
    202197Cucul::Sprite * Cucul::load_sprite (char const *f)
    203198{
  • libcaca/trunk/cpp/cucul++.h

    r784 r795  
    8989    void        fill_triangle ( int, int, int, int, int, int, char const *);
    9090    int         rand (int, int);
    91     unsigned int        sqrt (unsigned int);
    9291    Sprite *    load_sprite (char const *);
    9392    int         get_sprite_frames (Cucul::Sprite const *);
  • libcaca/trunk/cucul/Makefile.am

    r790 r795  
    1919        charset.c \
    2020        colour.c \
    21         math.c \
    2221        line.c \
    2322        box.c \
  • libcaca/trunk/cucul/cucul.c

    r790 r795  
    237237}
    238238
     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 */
     245int cucul_rand(int min, int max)
     246{
     247    return min + (int)((1.0*(max-min+1)) * rand() / (RAND_MAX+1.0));
     248}
     249
    239250/** \brief Export a canvas into a foreign format.
    240251 *
  • libcaca/trunk/cucul/cucul.h

    r778 r795  
    8080unsigned int cucul_get_height(cucul_t *);
    8181void cucul_free(cucul_t *);
     82int cucul_rand(int, int);
    8283/*  @} */
    8384
     
    142143void cucul_draw_thin_triangle(cucul_t *, int, int, int, int, int, int);
    143144void cucul_fill_triangle(cucul_t *, int, int, int, int, int, int, char const *);
    144 /*  @} */
    145 
    146 /** \defgroup math Mathematical functions
    147  *
    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);
    153145/*  @} */
    154146
Note: See TracChangeset for help on using the changeset viewer.