-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Benchmark for Lenear Interpolation methods
- Loading branch information
1 parent
85e301f
commit 9a81984
Showing
3 changed files
with
62 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
var Vector = require('../../dist/vectory.js') | ||
var rand = require('../rand.js') | ||
|
||
module.exports = { | ||
'Vector.lerp(one, another, t)': (function () { | ||
var one = new Vector(rand(0, 100), rand(0, 100)) | ||
var another = new Vector(rand(0, 100), rand(0, 100)) | ||
var time = 0.5 | ||
|
||
return function () { | ||
return Vector.lerp(one, another, time) | ||
} | ||
}()), | ||
|
||
'Vector#lerp(vector, t)': (function () { | ||
var one = new Vector(rand(0, 100), rand(0, 100)) | ||
var another = new Vector(rand(0, 100), rand(0, 100)) | ||
var time = 0.5 | ||
|
||
return function () { | ||
return one.lerp(another, time) | ||
} | ||
}()) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters