/[escript]/trunk/escript/src/UnaryFuncs.h
ViewVC logotype

Diff of /trunk/escript/src/UnaryFuncs.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

trunk/esys2/escript/src/Data/UnaryFuncs.h revision 102 by jgs, Wed Dec 15 07:08:39 2004 UTC trunk/escript/src/UnaryFuncs.h revision 615 by elspeth, Wed Mar 22 02:12:00 2006 UTC
# Line 1  Line 1 
1  // $Id$  // $Id$
2  /*  /*
3   ******************************************************************************   ************************************************************
4   *                                                                            *   *          Copyright 2006 by ACcESS MNRF                   *
5   *       COPYRIGHT  ACcESS 2004 -  All Rights Reserved                        *   *                                                          *
6   *                                                                            *   *              http://www.access.edu.au                    *
7   * This software is the property of ACcESS. No part of this code              *   *       Primary Business: Queensland, Australia            *
8   * may be copied in any form or by any means without the expressed written    *   *  Licensed under the Open Software License version 3.0    *
9   * consent of ACcESS.  Copying, use or modification of this software          *   *     http://www.opensource.org/licenses/osl-3.0.php       *
10   * by any unauthorised person is illegal unless that person has a software    *   *                                                          *
11   * license agreement with ACcESS.                                             *   ************************************************************
  *                                                                            *  
  ******************************************************************************  
12  */  */
13                                                                                                                                                        
14  #if !defined escript_UnaryFuncs_20041124_H  #if !defined escript_UnaryFuncs_20041124_H
# Line 22  inline Line 20  inline
20  double  double
21  fsign(double x)  fsign(double x)
22  {  {
23    return x/fabs(x);    if (x == 0) {
24        return 0;
25      } else {
26        return x/fabs(x);
27      }
28  }  }
29    
30  } // end of namespace  } // end of namespace

Legend:
Removed from v.102  
changed lines
  Added in v.615

  ViewVC Help
Powered by ViewVC 1.1.26