source: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Parameters_is_xxx.cpp @ 2

Last change on this file since 2 was 2, checked in by kane, 17 years ago

Import Morpheo

File size: 876 bytes
Line 
1/*
2 * $Id$
3 *
4 * [ Description ]
5 *
6 */
7
8#include "Behavioural/include/Parameters.h"
9
10
11namespace morpheo              {
12namespace behavioural          {
13
14  bool Parameters::is_natural            (double  val )  { return ( (val >= 0) && (floor(val) == ceil(val)));};
15  bool Parameters::is_positive           (double  val )  { return ( (val >= 1) && (floor(val) == ceil(val)));};
16  bool Parameters::is_multiple           (uint32_t val1,
17                                          uint32_t val2) { return is_positive((1.0*val1)/(1.0*val2));};
18  bool Parameters::is_between_inclusive  (uint32_t val,
19                                          uint32_t min,
20                                          uint32_t max)  { return ((val >= min) && (val <= max));};
21  bool Parameters::is_between_exclusive  (uint32_t val,
22                                          uint32_t min,
23                                          uint32_t max)  { return ((val >  min) && (val <  max));};
24 
25}; // end namespace behavioural         
26}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.