home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 1998 April / DPPCPRO0498.ISO / April / MathCad / SETUP / DATA.Z / fix.mxs < prev    next >
Encoding:
Text File  |  1997-06-03  |  727 b   |  22 lines

  1. /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  2.  *                                                                     *
  3.  * Copyright (c) 1997 MathSoft, Inc. All Rights Reserved.              *
  4.  *                                                                     *
  5.  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
  6. /*
  7.  *  Function:  fix ( x )
  8.  *
  9.  *  Description:
  10.  *      fix() rounds x down to the nearest integer if x > 0 and
  11.  *      rounds x up to the nearest integer if x < 0.  This is the
  12.  *      same function as trunc.
  13.  *      
  14.  *
  15.  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
  16.  
  17. function fix ( x );
  18.  
  19.    fix=trunc(x);
  20.  
  21. end
  22.