Implementing Long and Double as blueprint types

I’ve spent many hours implementing the ‘long’ type as a blueprint value type. Actually the implementation was quite easy. I’ve marked every location I needed to make a change with ‘/* KVAR */’ so I know every place that I need to go to implement double. It should be a pretty painless process. But I’ve run into an issue with specifically SpinBoxes. SpinBoxes use doubles in the process of updating it’s NumericValue. Because we previously only had 32 bit or less value types available, a 64 bit double works great! But because long has been implemented, new methods are required to ensure that we don’t exceed the bounds of our NumericValue. Specifically, Clamp<double>((Long)InValue, GetMinValue(), GetMaxValue()) wont work. Now what needs to happen is we need to detect if our value is going to exceed it’s limits before we do any addition. So I am currently waiting on a build to test my changes. Wish me luck! I’m hoping to have a pull request ready by Monday!

I’ve got the SpinBox working for all types again. It could still use some work though. But I’m setting that aside for now. For long, I’ve implemented all the math functions currently supported for long. I’m certain I’ve done everything to implement a new blueprint type. As such, I’m going to spend today implementing double.

In the case that anyone might want to see a screen shot of my progress, here you go!

I’d like to think I made good progress today. I finished up with the Long type and implemented most of the Double type. Double still needs a bit of work though. I can’t modify the value via the SpinBox. I’m also unsure of which conversion should be allowed. I also implemented a bunch of the more advanced functions such as sin, cos, etc. I also need to update some tool tips, descriptions and categories. Here’s a screen shot of my current progress.

Just a little update. I finally finished with doubles. Boy, that was a task! I also implemented truncate double to long and double to text. I also updated tool tips and descriptions. I still need to work with the SSpinBox and might do some function organizing. I also have to go back and make sure I used the right text formatting parameters. I’m considering implementing double to float but I can see this causing problems with those who don’t know the potential consequences. Anyone got any input?

Looks excellent this needs to be added to the engine ASAP.

I finally made a pull request last night. Though, I’m not sure I did it right. Here is the link. This is only the 2nd pull request I have done so if something looks wrong please let me know. I’ll be making a push to it that adds a double to float conversion later today. I’m currently waiting for a build to complete to test. I didn’t think it was something that should be implemented because of the risks but as soon as I started using doubles in some of my math functions, I realized that it was necessary. The linked pull request page has more details.

How long do you think it will be until it is fully working? Can’t wait for this to be added to the engine!