understand a pseudo angle implementation

I'm trying to understand a go library for Delaunay triangulation and found out this function to calculate the pseudo angle

Here is the implementation of the psuedo angle

    func pseudoAngle(dx, dy float64) float64 {
p := dx / (math.Abs(dx) + math.Abs(dy))
if dy > 0 {
p = (3 - p) / 4
} else {
p = (1 + p) / 4
}
return math.Max(0, math.Min(1-eps, p))
}


Here is were it have been used :

func (t *triangulator) hashKey(point r3.Point) int {

d := point.Sub(t.center)
return int(pseudoAngle(d[0], d[1]) * float64(len(t.hash)))
}


Do you have any idea of where this implementation is coming from mathematically ?

First, the expression dx / (math.Abs(dx) + math.Abs(dy)), can be seen as normalizing the vector in the 1-norm or taxicab norm as opposed to the usual Euclidean norm. In other words, it's projecting the vector onto the unit diamond: