The Shaggy Dev | 5 more quick GDScript tips @TheShaggyDev | Uploaded August 2022 | Updated October 2024, 26 minutes ago.
Let's look at five small tips for working with GDScript that you may find useful.
Better float comparison: 00:00
Wrapping values: 00:53
Smoother interpolation: 01:14
Custom errors and warnings: 01:32
Mapping values to a range: 01:58
Code snippets: shaggydev.com/2022/08/02/more-gdscript-tips
-Documentation links-
Floats in Godot: docs.godotengine.org/en/stable/classes/class_float.html
is_equal_approx: docs.godotengine.org/en/stable/classes/class_%40gdscript.html#class-gdscript-method-is-equal-approx
is_zero_approx: docs.godotengine.org/en/stable/classes/class_%40gdscript.html#class-gdscript-method-is-zero-approx
wrapf: docs.godotengine.org/en/stable/classes/class_%40gdscript.html#class-gdscript-method-wrapf
wrapi: docs.godotengine.org/en/stable/classes/class_%40gdscript.html#class-gdscript-method-wrapi
smoothstep: docs.godotengine.org/en/stable/classes/class_%40gdscript.html#class-gdscript-method-smoothstep
push_error: docs.godotengine.org/en/stable/classes/class_%40gdscript.html#class-gdscript-method-push-error
push_warning: docs.godotengine.org/en/stable/classes/class_%40gdscript.html#class-gdscript-method-push-warning
range_lerp: docs.godotengine.org/en/stable/classes/class_%40gdscript.html#class-gdscript-method-range-lerp
Let's look at five small tips for working with GDScript that you may find useful.
Better float comparison: 00:00
Wrapping values: 00:53
Smoother interpolation: 01:14
Custom errors and warnings: 01:32
Mapping values to a range: 01:58
Code snippets: shaggydev.com/2022/08/02/more-gdscript-tips
-Documentation links-
Floats in Godot: docs.godotengine.org/en/stable/classes/class_float.html
is_equal_approx: docs.godotengine.org/en/stable/classes/class_%40gdscript.html#class-gdscript-method-is-equal-approx
is_zero_approx: docs.godotengine.org/en/stable/classes/class_%40gdscript.html#class-gdscript-method-is-zero-approx
wrapf: docs.godotengine.org/en/stable/classes/class_%40gdscript.html#class-gdscript-method-wrapf
wrapi: docs.godotengine.org/en/stable/classes/class_%40gdscript.html#class-gdscript-method-wrapi
smoothstep: docs.godotengine.org/en/stable/classes/class_%40gdscript.html#class-gdscript-method-smoothstep
push_error: docs.godotengine.org/en/stable/classes/class_%40gdscript.html#class-gdscript-method-push-error
push_warning: docs.godotengine.org/en/stable/classes/class_%40gdscript.html#class-gdscript-method-push-warning
range_lerp: docs.godotengine.org/en/stable/classes/class_%40gdscript.html#class-gdscript-method-range-lerp