mirror of
https://github.com/Relintai/gdnative_cpp.git
synced 2024-12-25 14:07:10 +01:00
Handle inf default values in the bindings generator.
This commit is contained in:
parent
2b669fcb6f
commit
c6607875c9
@ -349,6 +349,9 @@ def generate_class_header(used_classes, c, use_template_get_node):
|
||||
if default_value == "Null" or default_value == "[Object:null]":
|
||||
return "nullptr"
|
||||
|
||||
if _type == 'float':
|
||||
return default_value.replace("inf", "Math_INF")
|
||||
|
||||
return default_value
|
||||
|
||||
if argument["has_default_value"] or has_default_argument:
|
||||
|
@ -105,6 +105,8 @@ typedef float real_t;
|
||||
|
||||
#define Math_PI 3.1415926535897932384626433833
|
||||
#define Math_TAU 6.2831853071795864769252867666
|
||||
#define Math_INF INFINITY
|
||||
#define Math_NAN NAN
|
||||
|
||||
#define _PLANE_EQ_DOT_EPSILON 0.999
|
||||
#define _PLANE_EQ_D_EPSILON 0.0001
|
||||
|
Loading…
Reference in New Issue
Block a user