IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 27, 2006, 4:53:03 PM (20 years ago)
Author:
drobbin
Message:

Add Length functions/tests. Modified psPixelsAlloc to set n=0.

Location:
trunk/psLib/src/mathtypes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/mathtypes/psVector.c

    r6484 r6500  
    99*  @author Robert DeSonia, MHPCC
    1010*
    11 *  @version $Revision: 1.65 $ $Name: not supported by cvs2svn $
    12 *  @date $Date: 2006-02-24 23:43:15 $
     11*  @version $Revision: 1.66 $ $Name: not supported by cvs2svn $
     12*  @date $Date: 2006-02-28 02:53:03 $
    1313*
    1414*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    10011001}
    10021002
     1003long psVectorLength(const psVector *vector)
     1004{
     1005    if ( !psMemCheckVector((psVector*)vector) ) {
     1006        psError(PS_ERR_BAD_PARAMETER_TYPE, true,
     1007                "Error:  Specified vector is not a valid psVector \n");
     1008        return -1;
     1009    }
     1010    return (vector->n);
     1011}
     1012
     1013
  • trunk/psLib/src/mathtypes/psVector.h

    r6227 r6500  
    1111 *  @author Ross Harman, MHPCC
    1212 *
    13  *  @version $Revision: 1.51 $ $Name: not supported by cvs2svn $
    14  *  @date $Date: 2006-01-28 01:12:14 $
     13 *  @version $Revision: 1.52 $ $Name: not supported by cvs2svn $
     14 *  @date $Date: 2006-02-28 02:53:03 $
    1515 *
    1616 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    260260);
    261261
     262/** Get the number of elements in use from a specified psVector. (vector.n)
     263 *
     264 *  @return long:       The number of elements in use.
     265 */
     266long psVectorLength(
     267    const psVector *vector             ///< input psVector
     268);
     269
     270
    262271/// @}
    263272
Note: See TracChangeset for help on using the changeset viewer.