Last change
on this file since 3615 was 3308, checked in by ansari, 18 years ago |
Creation du module AnaLC (lecture suivi EROS avec SOPHYA) dans la base
SOPHYA - cmv+reza 22/08/2007
|
-
Property svn:executable
set to
*
|
File size:
508 bytes
|
Line | |
---|
1 | /* Fonctions de conversions avec limites */
|
---|
2 | /* CMV - Juin 94 / Reza */
|
---|
3 |
|
---|
4 | #include <stdlib.h>
|
---|
5 | #include <stdio.h>
|
---|
6 |
|
---|
7 | #include "machdefs.h"
|
---|
8 |
|
---|
9 | #include "convlim.h"
|
---|
10 |
|
---|
11 |
|
---|
12 | /* Nouvelle-Fonction */
|
---|
13 | short LimitShort(float x)
|
---|
14 | {
|
---|
15 | float ls;
|
---|
16 |
|
---|
17 | ls = ( x < 32760.) ? x : 32760. ;
|
---|
18 | ls = ( ls < -32760.) ? -32760. : ls;
|
---|
19 | return((short)ls);
|
---|
20 | }
|
---|
21 |
|
---|
22 | /* Nouvelle-Fonction */
|
---|
23 | unsigned short LimitUShort(float x)
|
---|
24 | {
|
---|
25 | float ls;
|
---|
26 |
|
---|
27 | ls = ( x < 65530.) ? x : 65530. ;
|
---|
28 | ls = ( ls < 0.) ? 0. : ls;
|
---|
29 | return((unsigned short)ls);
|
---|
30 | }
|
---|
31 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.