You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 19, 2019. It is now read-only.
Due to JavaScript/TypeScript not really having a notion of an integer (outside of the recently added BigInt) it becomes a problem when you have functions like UKismetMathLibrary::Clamp, which only clamps int32.
... which looks harmless but will in fact truncate any decimals that gets sent into it. Outside of looking at the actual C++ declaration of the target function there is no way of knowing if something will truncate or not.
I'm not sure how to fix this, but one alternative would be to at least emit some kind of documentation, like:
/** * @param value Warning: Integer parameter, will truncate * @param min Warning: Integer parameter, will truncate * @param max Warning: Integer parameter, will truncate */staticclamp(value: number,min: number,max: number): number;
The text was updated successfully, but these errors were encountered:
Due to JavaScript/TypeScript not really having a notion of an integer (outside of the recently added
BigInt
) it becomes a problem when you have functions likeUKismetMathLibrary::Clamp
, which only clampsint32
.This then shows up in the typings as:
... which looks harmless but will in fact truncate any decimals that gets sent into it. Outside of looking at the actual C++ declaration of the target function there is no way of knowing if something will truncate or not.
I'm not sure how to fix this, but one alternative would be to at least emit some kind of documentation, like:
The text was updated successfully, but these errors were encountered: