Commit graph

9 commits

Author SHA1 Message Date
Joel Croteau
981f1e9298 Rename VariantUtilityFunctions::join() to join_string() 2025-05-12 17:51:09 -05:00
Joel Croteau
8be7ad32e7 Consolidate and simplify string joining code in VariantUtilityFunctions
`variant_utility.cpp` has 8 different copies of the exact same loop to join
vararg strings together. This is bad coding process and makes the codebase
needlessly cluttered. Also, the loop itself has an i == 0 check that is
unnecessary since String is auto-initialized to be empty and String::operator+=
already checks if it is empty before appending. This is a non-functional change
that only reorganizes the code to be a bit more readable.
2025-05-12 17:47:14 -05:00
Thaddeus Crews
324512e11c
Style: Replace header guards with #pragma once 2025-03-07 17:33:47 -06:00
lawnjelly
5c6d7bfb98 Change VariantUtility to prevent undef print_verbose
Changes the `VariantUtility` function from `print_verbose` to `_print_verbose`, eliminating the need for undefining the `print_verbose` macro, which caused compilation problems.
2025-01-30 10:29:11 +00:00
Muller-Castro
a8bc9f3e78 Add const lvalue ref to core/* container parameters 2024-02-14 11:20:36 -03:00
Jakub Janšta
74c937079c Add type_string() utility 2023-10-02 17:41:20 +02:00
etti
3a39de4e2f Add rotate_toward and angle_difference to GDScript and C# 2023-10-01 22:19:42 +02:00
Jcrespo
528a76486c Add inverse hyperbolic functions asinh(), acosh() & atanh()
GDScript has the following built-in trigonometry functions:

- `sin()`
- `cos()`
- `tan()`
- `asin()`
- `acos()`
- `atan()`
- `atan()`
- `sinh()`
- `cosh()`
- `tanh()`

However, it lacks the hyperbolic arc (also known as inverse
hyperbolic) functions:

- `asinh()`
- `acosh()`
- `atanh()`

Implement them by just exposing the C++ Math library, but clamping
its values to the closest real defined value.
For the cosine, clamp input values lower than 1 to 1.
In the case of the tangent, where the limit value is infinite,
clamp it to -inf or +inf.

References #78377
Fixes godotengine/godot-proposals#7110
2023-09-01 01:27:56 +02:00
Aaron Franke
7e9b5e59d4
Make a header for VariantUtilityFunctions 2023-06-12 11:29:42 -05:00