How do I get the mouse input direction from the center of the screen to trigger an event from the released position of the mouse?

wait, it only works when i go perfectly to the direction i need. is there a way to have an error margin? i tried a normalized to range node but it doesnt work