diff options
author | Yuri Sizov <11782833+YuriSizov@users.noreply.github.com> | 2023-05-30 16:12:01 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-30 16:12:01 +0200 |
commit | 379f28d7dc5cddb67cf54ee31fd27888738e55b3 (patch) | |
tree | e59843704dbe9d9810683bb1de65c6700642a4aa /doc | |
parent | a86429858bd7ae88b5609dd1c104157004dde2c8 (diff) | |
parent | d209857ea70b495ae7e01993e403631e4ca6e28b (diff) | |
download | redot-engine-379f28d7dc5cddb67cf54ee31fd27888738e55b3.tar.gz |
Merge pull request #77226 from aaronfranke/clamp
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 db0fa69181..2bf43be39d 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"> |