# How to test if a float is between two values?

**URL:** <https://forums.unrealengine.com/t/how-to-test-if-a-float-is-between-two-values/365400>\
**Category:** Blueprint\
**Tags:** logic, branch, unreal-engine, Blueprint, question\
**Created:** [July 28, 2016, 3:49am UTC](https://forums.unrealengine.com/t/how-to-test-if-a-float-is-between-two-values/365400 "2016-07-28T03:49:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_1ed1c3df](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_1ed1c3df](https://forums.unrealengine.com/u/anonymous_user_1ed1c3df)\
**Post date:** [July 28, 2016, 3:49am UTC](https://forums.unrealengine.com/t/how-to-test-if-a-float-is-between-two-values/365400/1 "2016-07-28T03:49:33Z")

</div>

I’m trying to write a conditional statement in blueprints using the branch and I have no clue who to make it use the `&&` or `||` operators.

```
if( someFloatValue >= someThreshold && someFloatValue <= anotherThreashold ){
    ...
}

```

---

<div class="post-metadata">

**Author:** ![Slayemin](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Slayemin](https://forums.unrealengine.com/u/Slayemin)\
**Post date:** [July 28, 2016, 3:51am UTC](https://forums.unrealengine.com/t/how-to-test-if-a-float-is-between-two-values/365400/2 "2016-07-28T03:51:50Z")

</div>

&& is the Logical AND operator.

|| is the Logical OR operator.

You can type those symbols into the blueprint search and it should show up as “Logical AND” or “Logical OR”.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_1ed1c3df](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_1ed1c3df](https://forums.unrealengine.com/u/anonymous_user_1ed1c3df)\
**Post date:** [July 28, 2016, 4:00am UTC](https://forums.unrealengine.com/t/how-to-test-if-a-float-is-between-two-values/365400/3 "2016-07-28T04:00:05Z")

</div>

Was using the wrong search query. Thanks.

---

<div class="post-metadata">

**Author:** ![Dexgecko](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Dexgecko](https://forums.unrealengine.com/u/Dexgecko)\
**Post date:** [July 10, 2018, 1:23am UTC](https://forums.unrealengine.com/t/how-to-test-if-a-float-is-between-two-values/365400/4 "2018-07-10T01:23:21Z")

</div>

You can use the [InRange](https://api.unrealengine.com/INT/BlueprintAPI/Math/Float/InRange_float/index.html) node, which allows you to set a min, max and whether each side is inclusive.
