@name Robotboy655's Digital Screen Test
@inputs DS:wirelink 
@outputs 
@persist Ranger:ranger CX CY Start
@trigger 

#CAMERA!

interval(10)

while(ops() < (maxquota() - 100))
{
    X = DS[1048573]
    Y = DS[1048572]
    RangerD = 255
    
    Ranger = ranger(RangerD,CX / (X / 2) - 1,CY / (Y / 2) - 1)
    Distance = Ranger:distance()
    
    DS[1048575] = 1
    Ops = CX + CY * X
    DS[Ops] = clamp(255 - Distance / RangerD * 255,0,255)

    CX++
    if(CX >= X)
    {
        CY++
        CX = 0
    }
    if(CY >= Y)
    {
        CY = 0
        CX = 0

        print("" + (1 / (curtime() - Start)))
        Start = curtime()
    }
}

