+ always ensure first value in gamma table to 0

This commit is contained in:
artemp 2013-03-22 12:30:46 +00:00
parent c84d83a685
commit f96de9bdd8

View file

@ -2,8 +2,8 @@
// Anti-Grain Geometry - Version 2.4
// Copyright (C) 2002-2005 Maxim Shemanarev (http://www.antigrain.com)
//
// Permission to copy, use, modify, sell and distribute this software
// is granted provided this copyright notice appears in all copies.
// Permission to copy, use, modify, sell and distribute this software
// is granted provided this copyright notice appears in all copies.
// This software is provided "as is" without express or implied
// warranty, and with no claim as to its suitability for any purpose.
//
@ -40,6 +40,7 @@ namespace agg
double operator() (double x) const
{
if (x == 0.0) return 0.0;
return pow(x, m_gamma);
}
@ -122,6 +123,3 @@ namespace agg
}
#endif