changeset 1025:09c3fc7cf6ba

requesting a curve at t=0 used to return the last value instead of the first Ignore-this: bb2fbc67b2a86441674da187a8654326
author Drew Perttula <drewp@bigasterisk.com>
date Mon, 26 May 2014 18:19:23 +0000
parents 3506c2616728
children dad28ce27590
files light9/curvecalc/curve.py
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/light9/curvecalc/curve.py	Mon May 26 08:05:49 2014 +0000
+++ b/light9/curvecalc/curve.py	Mon May 26 18:19:23 2014 +0000
@@ -56,6 +56,8 @@
 
         i = bisect_left(self.points,(t,None))-1
 
+        if i == -1:
+            return self.points[0][1]
         if self.points[i][0]>t:
             return self.points[i][1]
         if i>=len(self.points)-1: