Skip to content

Commit

Permalink
Change minMax() to clamp()
Browse files Browse the repository at this point in the history
Mike Wilcox committed Jun 24, 2012

Verified

This commit was signed with the committer’s verified signature.
targos Michaël Zasso
1 parent 30bf41e commit 0fcf7ee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mouse.js
Original file line number Diff line number Diff line change
@@ -114,8 +114,8 @@ define([
last = { x:x, y:y };
}

var py = lang.minMax(y/this.box.h, 0, 1);
var px = lang.minMax(x/this.box.w, 0, 1);
var py = lang.clamp(y/this.box.h, 0, 1);
var px = lang.clamp(x/this.box.w, 0, 1);

var cx = this.box.w * px;
var cy = this.box.h * py;

0 comments on commit 0fcf7ee

Please sign in to comment.