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

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

Closed
cheese3660 opened this issue Feb 27, 2021 · 2 comments · May be fixed by #725
Closed

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

cheese3660 opened this issue Feb 27, 2021 · 2 comments · May be fixed by #725
Labels

Comments

@cheese3660
Copy link

cheese3660 commented Feb 27, 2021

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

@cheese3660 cheese3660 added the bug label Feb 27, 2021
@cheese3660
Copy link
Author

Also, this bug should still happen if even only one argument is an integer, as it casts the same way for all 3 arguments

@velddev
Copy link
Member

velddev commented Feb 27, 2021

Thanks for the bug report! I'm fairly certain you're the only person who has ever used the lerp function hahahha

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants