[babl/wip/poly: 2/5] babl: in babl-trc.c, fix babl_powf()
- From: N/A <ell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [babl/wip/poly: 2/5] babl: in babl-trc.c, fix babl_powf()
- Date: Sun, 10 Sep 2017 17:37:17 +0000 (UTC)
commit b43cb0f062ae6ab633a282a894fab2399cde0ac4
Author: Ell <ell_se yahoo com>
Date: Sun Sep 10 11:27:43 2017 -0400
babl: in babl-trc.c, fix babl_powf()
babl/babl-trc.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/babl/babl-trc.c b/babl/babl-trc.c
index b7a9717..6f97d83 100644
--- a/babl/babl-trc.c
+++ b/babl/babl-trc.c
@@ -366,10 +366,8 @@ static inline float obabl_powf(float x, float y)
static inline float babl_powf (float x, float y)
{
- float ret;
- ret = expf (y * logf (x));
- if (ret < 0.0 || ret < 0.0f)
- return ret;
+ if (x > 0.0f)
+ return expf (y * logf (x));
return 0.0f;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]