doonv / bevy_dev_console

Source-inspired developer console plugin for the Bevy game engine.
Apache License 2.0
112 stars 10 forks source link

Add Additional number types (and half-assed type inference) #5

Closed doonv closed 8 months ago

doonv commented 8 months ago

Objective

Fix #2.

Solution

Replace the f64 with a Number enum which allows several number types to be added. As for type inference I created the Number::Float(f64) and Number::Integer(i128) types which are generic types which then get downcasted when they are used with a known type.