source: Sophya/trunk/FrEROS/AnaLC/convlim.c@ 4086

Last change on this file since 4086 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 */
13short LimitShort(float x)
14{
15float ls;
16
17ls = ( x < 32760.) ? x : 32760. ;
18ls = ( ls < -32760.) ? -32760. : ls;
19return((short)ls);
20}
21
22/* Nouvelle-Fonction */
23unsigned short LimitUShort(float x)
24{
25float ls;
26
27ls = ( x < 65530.) ? x : 65530. ;
28ls = ( ls < 0.) ? 0. : ls;
29return((unsigned short)ls);
30}
31
Note: See TracBrowser for help on using the repository browser.