diff options
author | Aaron Franke <arnfranke@yahoo.com> | 2023-05-18 20:17:22 -0500 |
---|---|---|
committer | Aaron Franke <arnfranke@yahoo.com> | 2023-05-18 20:18:08 -0500 |
commit | d209857ea70b495ae7e01993e403631e4ca6e28b (patch) | |
tree | af33856be11bc7eac7a6fe00587526b6ee6c350d /doc | |
parent | 5bb7d585a5e151f3fa387de7dd97d7aebc5abfd5 (diff) | |
download | redot-engine-d209857ea70b495ae7e01993e403631e4ca6e28b.tar.gz |
Document that clamp works with any type that supports greater/less than
Diffstat (limited to 'doc')
-rw-r--r-- | doc/classes/@GlobalScope.xml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml index 6ba0deadaa..87573fd55c 100644 --- a/doc/classes/@GlobalScope.xml +++ b/doc/classes/@GlobalScope.xml @@ -180,7 +180,7 @@ <param index="1" name="min" type="Variant" /> <param index="2" name="max" type="Variant" /> <description> - Clamps the [param value], returning a [Variant] not less than [param min] and not more than [param max]. Supported types: [int], [float], [Vector2], [Vector2i], [Vector3], [Vector3i], [Vector4], [Vector4i]. + Clamps the [param value], returning a [Variant] not less than [param min] and not more than [param max]. Any values that can be compared with the less than and greater than operators will work. [codeblock] var a = clamp(-10, -1, 5) # a is -1 @@ -200,7 +200,7 @@ var f = clamp(Vector3i(-7, -8, -9), Vector3i(-1, 2, 3), Vector3i(-4, -5, -6)) # f is (-4, -5, -6) [/codeblock] - [b]Note:[/b] For better type safety, use [method clampf], [method clampi], [method Vector2.clamp], [method Vector2i.clamp], [method Vector3.clamp], [method Vector3i.clamp], [method Vector4.clamp], or [method Vector4i.clamp]. + [b]Note:[/b] For better type safety, use [method clampf], [method clampi], [method Vector2.clamp], [method Vector2i.clamp], [method Vector3.clamp], [method Vector3i.clamp], [method Vector4.clamp], [method Vector4i.clamp], or [method Color.clamp]. </description> </method> <method name="clampf"> |