mirror of
https://github.com/TiddlyWiki/TiddlyWiki5.git
synced 2026-05-02 11:06:59 +00:00
Revised test data
Testing against the output of cook.rb isn't satisfactory because of the bugs in it; instead we're now going to test against the tiddlywiki.com build products
This commit is contained in:
16
test/tiddlywiki.2.6.5/source/tiddlywiki/deprecated/Numbers.js
Executable file
16
test/tiddlywiki.2.6.5/source/tiddlywiki/deprecated/Numbers.js
Executable file
@@ -0,0 +1,16 @@
|
||||
//--
|
||||
//-- Deprecated Number functions
|
||||
//--
|
||||
|
||||
// @Deprecated: no direct replacement, since not used in core code
|
||||
// Clamp a number to a range
|
||||
Number.prototype.clamp = function(min,max)
|
||||
{
|
||||
var c = this;
|
||||
if(c < min)
|
||||
c = min;
|
||||
if(c > max)
|
||||
c = max;
|
||||
return Number(c);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user