Using DateTime as key in BinarySearch (KeyValuePair)

When trying to use DateTime as key, I get the following error. I think it is because Lerp is not defined for DateTime.
Any suggestions on how to procede?
image

The patch and some test data: BinarySearchTest2.zip (7.1 KB)

you could convert date time to a “lerpable” value, for example Float64, before you add it to the keyframe list, and then convert back and forth, whenever you need to.

OR, do it the pro vvvv gamma level 9999 way, implement a Lerp for DateTime and the adaptive system will find it and use it. just make sure the siganture is exactly the same as the other Lerp nodes.

Using TotalMinutes to get the minutes since the first date in the data.

Now I am struggling with it seeming like lerp doesn’t know about float64 and when I try to cast to float32 it doesn’t work and I only get the default value.
See Patch: BinarySearchLerpTest1.zip (6.1 KB)

there seems to be a bug in our implementation, it infers Float32 where it should be generic or at least a value that can be lerped… so just use ToFloat32 after the TotalMinutes, that should do it. I’ll note the bug…

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.