Changeset f7428b1 in buchla-68k for include/macros.h


Ignore:
Timestamp:
07/10/2017 01:26:59 AM (7 years ago)
Author:
Thomas Lopatic <thomas@…>
Branches:
master
Children:
5fa506d
Parents:
c3aee8a
Message:

Started to rework include files.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • include/macros.h

    rc3aee8a rf7428b1  
    88*/
    99
    10 #ifndef abs
     10#pragma once
     11
    1112#define abs(x)          ((x) < 0 ? -(x) : (x))
    12 #endif
     13#define sign(x, y)      ((x) < 0 ? -(y) : (y))
    1314
    14 #ifndef sign
    15 #define sign(x,y)       ((x) < 0 ? -(y) : (y))
    16 #endif
     15#define min(x, y)       ((x) > (y) ? (y) : (x))
     16#define max(x, y)       ((x) > (y) ? (x) : (y))
    1717
    18 #ifndef min
    19 #define min(x,y)        ((x) > (y) ? (y) : (x))
    20 #endif
    21 
    22 #ifndef max
    23 #define max(x,y)        ((x) > (y) ? (x) : (y))
    24 #endif
    25 
    26 #ifndef inrange
    27 #define inrange(var,lo,hi)      (((var) >= (lo)) && ((var) <= (hi)))
    28 #endif
     18#define inrange(var, lo, hi) \
     19                        (((var) >= (lo)) && ((var) <= (hi)))
Note: See TracChangeset for help on using the changeset viewer.