Skip to content

lerp accepts Variant as a weight, should be float #96528

Open
@aXu-AP

Description

Tested versions

Reproducible in v4.3.stable.official [77dcf97] or any 4.x

System information

Windows 11

Issue description

lerp accepts any Variant as a weight, altough it only supports float. Giving other values causes the function to fail silently. This problem was mentioned in #64332 as well, but I think it is a separate issue.
kuva

The function is registered with a macro FUNCBINDVR3, which doesn't offer flexibility around the argument types. Possible solutions: inline the contents of the macro and write correct get_argument_type(int p_arg) function. Or modify the macro to relay the correct argument types.

Steps to reproduce

Write

lerp(0.0, 10.0, "hello")

or just see the reference...

Minimal reproduction project (MRP)

N/A

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions