Changeset a9f2c13 for src/libcfa
- Timestamp:
- Jun 30, 2016, 4:17:59 PM (8 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- e20f53c
- Parents:
- 1bc1bb2
- Location:
- src/libcfa
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/libcfa/stdlib
r1bc1bb2 ra9f2c13 10 10 // Created On : Thu Jan 28 17:12:35 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Apr 27 22:03:29201613 // Update Count : 9 612 // Last Modified On : Thu Jun 30 15:04:18 2016 13 // Update Count : 97 14 14 // 15 15 … … 129 129 T max( const T t1, const T t2 ); 130 130 131 forall( otype T | { T min( T, T ); T max( T, T ); } ) 132 T clamp( const T value, const T min_val, const T max_val ); 133 131 134 forall( otype T ) 132 135 void swap( T * t1, T * t2 ); -
src/libcfa/stdlib.c
r1bc1bb2 ra9f2c13 10 10 // Created On : Thu Jan 28 17:10:29 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Apr 28 07:54:21201613 // Update Count : 16 612 // Last Modified On : Thu Jun 30 15:04:25 2016 13 // Update Count : 168 14 14 // 15 15 … … 254 254 } // max 255 255 256 forall( otype T | { T min( T, T ); T max( T, T ); } ) 257 T clamp( const T value, const T min_val, const T max_val ) { 258 return max( min_val, min( value, max_val ) ); 259 } // clamp 260 256 261 forall( otype T ) 257 262 void swap( T * t1, T * t2 ) {
Note: See TracChangeset
for help on using the changeset viewer.