How can I make this hexagon be exactly the height of the square I made this hexagon using a tutorial from erindale: https://www.youtube.com/watch?v=mLRqhcPIjg8&amp;t=334s

I'm trying to make a pattern using this hexagon (the carpet pattern in &quot;the shining&quot;) mathematically with nodes. But all my different measurements and equations rely on the hexagon being exactly the height of the square or two units. Just messing around with the less than value It got closer and closer as i approached the value .43333... (6.5/15) but if you look very closely you can see that its a little two big,

so when I tried to recreate the pattern it wasn't perfect.
If there's a way to find the height of the gradient and map it to 1 using map range, or maybe a different way to make a hexagon that defaults to this height, that's what I need.
By splitting a hex of height 1 into equilateral triangles, and Pythagoras, we know its side-to-side width is sqrt(3)/2. So, if we just look at the threshold in X, we know that has to be sqrt(3)/4. (And, IMO, that's an easier way to think about it than considering the dot-product branch of your tree)

You would hard-code that value into the Less Than, though, so it doesn't have to be recalculated for every shading-point... (the same goes for your existing sqrt(3). )