Question abount bindings delta double vs float #711
Replies: 2 comments
-
Godot uses a peculiar setup, the bridge for numbers uses Doubles, but the data structures for Vectors are defined as Floats, that is why you are observing this. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Sweet so intentional behavior. Thanks :) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I noticed in the original function definition for _process and _physics_process we are passed in a float from the godot engine to work with. However in the swift bindings we are passed in a double. I was just curious if this was intended or some kind of oversight?
As it currently stands I have to cast delta to a float to use it for example with setting a velocity. Not the end of the world. It just seems a bit odd. Also I am guessing this would have some kind of performance impact even though it would be very minimal?
example
https://migueldeicaza.github.io/SwiftGodotDocs/documentation/swiftgodot/mainloop/_physicsprocess(delta:)
https://docs.godotengine.org/en/stable/classes/class_node.html#class-node-private-method-physics-process
Beta Was this translation helpful? Give feedback.
All reactions