From 3eec98906b7ff2c3f977d6119d8b75e0641fe332 Mon Sep 17 00:00:00 2001 From: rxi Date: Thu, 27 Feb 2014 23:35:07 +0000 Subject: [PATCH] Removed "len" argument from lume.pingpong() --- README.md | 4 ++-- lume.lua | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 563a791..78b68fb 100644 --- a/README.md +++ b/README.md @@ -33,8 +33,8 @@ range of 0 - 1; if `amount` is outside of this range it is clamped. Similar to `lume.lerp()` but uses cosine interpolation instead of linear interpolation. -### lume.pingpong(x, len) -Ping-pongs the value `x` between 0 and `len`. +### lume.pingpong(x) +Ping-pongs the value `x` between 0 and 1. ### lume.distance(x1, y1, x2, y2) Returns the distance between the two points. diff --git a/lume.lua b/lume.lua index eaa4ed5..9e35d43 100644 --- a/lume.lua +++ b/lume.lua @@ -7,7 +7,7 @@ -- under the terms of the MIT license. See LICENSE for details. -- -local lume = { _version = "1.0.1" } +local lume = { _version = "1.0.2" } function lume.clamp(x, min, max) @@ -36,8 +36,8 @@ function lume.smooth(a, b, amount) end -function lume.pingpong(x, len) - return (1 - math.abs(1 - x % 2)) * (len or 1) +function lume.pingpong(x) + return 1 - math.abs(1 - x % 2) end