Skip to content
This repository was archived by the owner on Sep 3, 2024. It is now read-only.
This repository was archived by the owner on Sep 3, 2024. It is now read-only.

Lerp in the >calc command doesn't cast correctly #724

@cheese3660

Description

@cheese3660

Describe the bug
When using the lerp function in the calc command with 3 integers passed as arguments it returns an error rather than casting the integers to doubles and evaluating from there

To Reproduce
Steps to reproduce the behavior:

  1. Go to a discord server w/ this bot in it
  2. Type the command ">calc lerp(1,2,3)" or w/ any other combination of integers as arguments
  3. Send the message
  4. This error then appears: "Your calculation threw an error: Unable to cast object of type 'System.Int32' to type 'System.Double'."

Expected behavior
For the correct result of the lerp function to be returned as if the arguments were doubles instead of integers, in the case of lerp(1,2,3) that would be 4

Screenshots
Error
Error
Expected Behaviour
Expected behaviour

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions