summaryrefslogtreecommitdiffstats
path: root/libdimension/dimension
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2014-08-15 10:29:23 -0400
committerTavian Barnes <tavianator@tavianator.com>2014-08-15 10:29:52 -0400
commitb85ae851c9d8c91bc3a4c698403a24c8c09f4628 (patch)
treeb10e6695c65ede0dd88ab9fe5039e5a8f479f603 /libdimension/dimension
parent2ac69f37ad5da0aeaffe89e40de4e867c19fa65f (diff)
downloaddimension-b85ae851c9d8c91bc3a4c698403a24c8c09f4628.tar.xz
color: Rename saturate to clamp.
Diffstat (limited to 'libdimension/dimension')
-rw-r--r--libdimension/dimension/color.h4
-rw-r--r--libdimension/dimension/tcolor.h6
2 files changed, 5 insertions, 5 deletions
diff --git a/libdimension/dimension/color.h b/libdimension/dimension/color.h
index afc4a5c..1b21d94 100644
--- a/libdimension/dimension/color.h
+++ b/libdimension/dimension/color.h
@@ -1,5 +1,5 @@
/*************************************************************************
- * Copyright (C) 2009-2011 Tavian Barnes <tavianator@tavianator.com> *
+ * Copyright (C) 2009-2014 Tavian Barnes <tavianator@tavianator.com> *
* *
* This file is part of The Dimension Library. *
* *
@@ -156,7 +156,7 @@ dmnsn_color_illuminate(dmnsn_color light, dmnsn_color color)
/** Saturate the color components to [0.0, 1.0]. */
DMNSN_INLINE dmnsn_color
-dmnsn_color_saturate(dmnsn_color color)
+dmnsn_color_clamp(dmnsn_color color)
{
color.R = dmnsn_min(dmnsn_max(color.R, 0.0), 1.0);
color.G = dmnsn_min(dmnsn_max(color.G, 0.0), 1.0);
diff --git a/libdimension/dimension/tcolor.h b/libdimension/dimension/tcolor.h
index 4432dd1..f85fcd6 100644
--- a/libdimension/dimension/tcolor.h
+++ b/libdimension/dimension/tcolor.h
@@ -1,5 +1,5 @@
/*************************************************************************
- * Copyright (C) 2009-2011 Tavian Barnes <tavianator@tavianator.com> *
+ * Copyright (C) 2009-2014 Tavian Barnes <tavianator@tavianator.com> *
* *
* This file is part of The Dimension Library. *
* *
@@ -91,9 +91,9 @@ dmnsn_tcolor_remove_filter(dmnsn_tcolor tcolor)
/** Saturate the tcolor components to [0.0, 1.0]. */
DMNSN_INLINE dmnsn_tcolor
-dmnsn_tcolor_saturate(dmnsn_tcolor tcolor)
+dmnsn_tcolor_clamp(dmnsn_tcolor tcolor)
{
- tcolor.c = dmnsn_color_saturate(tcolor.c);
+ tcolor.c = dmnsn_color_clamp(tcolor.c);
tcolor.T = dmnsn_min(dmnsn_max(tcolor.T, 0.0), 1.0);
tcolor.F = dmnsn_min(dmnsn_max(tcolor.F, 0.0), 1.0);
return tcolor;