Clamp problem

Tagged: 

This topic contains 4 replies, has 2 voices, and was last updated by  kinetic 1 year, 8 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #9507

    kinetic
    Participant

    Hey, could someone point out how to call the internal Clamp command with it’s <T> structure. Both normal ways dont work for me (I.e Clamp<Float> or just Clamp())

    #9508

    Hezkore
    Participant

    I’m not having any problems with it.

    You have to make sure all 3 values are of the same type though.
    If ‘a’ is an Int, you’ll have to specify min and max as int.
    If ‘a’ is a Float, min and min must be floats too etc.

    Otherwise it’ll throw you errors like:

    #9509

    kinetic
    Participant

    Sorry it was because of a func in my class titled clamp also, it was calling that instead of the built-in function. Thanks.

    #9510

    Hezkore
    Participant

    You can specify which one you want to use by calling

    #9511

    kinetic
    Participant

    Thanks, working now.

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.