Subversion Repositories wpShopGermany4

Rev

Rev 7472 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7472 Rev 7704
Line 206... Line 206...
206
			}
206
			}
207
			
207
			
208
		}
208
		}
209
	  
209
	  
210
	};
210
	};
211
	
-
 
212
211
 
-
 
212
	wpsg_round = function(value, exp) {
-
 
213
 
-
 
214
		if (typeof exp === 'undefined' || +exp === 0) return Math.round(value);
-
 
215
 
-
 
216
		value = +value;
-
 
217
		exp = +exp;
-
 
218
 
-
 
219
		if (isNaN(value) || !(typeof exp === 'number' && exp % 1 === 0)) return NaN;
-
 
220
 
-
 
221
		value = value.toString().split('e');
-
 
222
		value = Math.round(+(value[0] + 'e' + (value[1] ? (+value[1] + exp) : exp)));
-
 
223
 
-
 
224
		value = value.toString().split('e');
-
 
225
		return +(value[0] + 'e' + (value[1] ? (+value[1] - exp) : -exp));
-
 
226
 
-
 
227
	}
-
 
228
213
229