Log In  

Cart #knutil_inrng-2 | 2022-06-30 | Code ▽ | Embed ▽ | No License
1

Feature Overview

INRNG() Tests if the value is between the lowest and highest values.

  • Tests that the specified value is within a range.
  • This function consumes 10 Token.
--[true] in range value
inrng(5,1,10) 

--[true] lowest range value
inrng(1,1,10)

--[true] highest range value
inrng(10,1,10)

--[false] out of range value
inrng(0,1,10)

--Player:1 any key
inrng(btn(),0x1,0xff)

--Player:2 any key
inrng(btn(),0x100,0xff00)

This function is included in the KNUTIL library.

release note


v0.2

  • change arguments to a tuple

v0.1

  • first release

P#69481 2022-06-30 01:57 ( Edited 2022-12-27 06:00)

1

using ... twice like that is a neat trick; I'll have to remember that!

P#113840 2022-06-30 17:45

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2023-02-06 10:24:59 | 0.006s | Q:12