1 auto vh = ValueLimiter!(2,float)(); 2 3 vh.minLimit = 0; 4 vh.maxLimit = 10; 5 6 vh.set( 0, 5 ); 7 vh.set( 1, 7 ); 8 9 assert( vh.get(0) == 5 ); 10 assert( vh.get(1) == 7 ); 11 12 vh.set(1,3); 13 14 assert( vh.get(0) == 3 ); 15 assert( vh.get(1) == 3 ); 16 17 vh.set(1,20); 18 assert( vh.get(0) == 3 ); 19 assert( vh.get(1) == 10 );