How do I solve this implicit equation?

So I am trying to make this thing where it detects how close u are to a edge and this is what i got so far
Screen Shot 2021-03-22 at 4.34.10 PM

However I need it to be where instead of it equaling 1 I need it to equal x. Thank you!

Solved it, k is x

It does. He’s trying to detect how close you are to the edge.

oh, sorry! i didn’t see that sentence