Changeset 7901 for trunk/psLib/src/math
- Timestamp:
- Jul 13, 2006, 4:26:25 PM (20 years ago)
- Location:
- trunk/psLib/src/math
- Files:
-
- 2 edited
-
psRegion.c (modified) (3 diffs)
-
psRegion.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/math/psRegion.c
r7563 r7901 6 6 #include "psRegion.h" 7 7 8 static void regionFree(psRegion *region) 9 { 10 // There are non dynamic allocated items 11 } 12 8 13 psRegion *psRegionAlloc(float x0, 9 14 float x1, … … 12 17 { 13 18 psRegion *region = psAlloc(sizeof(psRegion)); // New region, to be returned 19 psMemSetDeallocator(region, (psFreeFunc)regionFree); 14 20 // No complex structures, so no special deallocator 15 21 *region = psRegionSet(x0, x1, y0, y1); … … 101 107 } 102 108 109 bool psMemCheckRegion(psPtr ptr) 110 { 111 if (!is_psType(ptr)) { 112 return false; 113 } 114 return ( psMemGetDeallocator(ptr) == (psFreeFunc)regionFree ); 115 } 116 117 -
trunk/psLib/src/math/psRegion.h
r7563 r7901 27 27 float y1 ///< the last row of the region + 1. 28 28 ); 29 30 /** Checks the type of a particular pointer. 31 * 32 * Uses the appropriate deallocation function in psMemBlock to check the ptr datatype. 33 * 34 * @return bool: True if the pointer matches a psRegion structure, false otherwise. 35 */ 36 bool psMemCheckRegion( 37 psPtr ptr ///< the pointer whose type to check 38 ); 29 39 30 40 /** Create a psRegion with the specified attributes. … … 70 80 ); 71 81 72 // Test if any element of the region is NaN 73 bool psRegionIsNaN(psRegion region// Region to check 74 ); 82 /** Test if any element of the region is NaN 83 * 84 * @return bool: True if an element is NaN, otherwise false. 85 */ 86 bool psRegionIsNaN( 87 psRegion region ///< Region to check 88 ); 75 89 76 90 #endif
Note:
See TracChangeset
for help on using the changeset viewer.
