anchor.diff:                  ! values.
                   if(p%on_wall_id%w2 == +1) then
                      if(abs(t1) < abs(t2)) then
  -                      call insert_t(t2, 2, +1, geo%ew2(p%icell%i2+1))
  +                      call insert_t(t2, 2, +1, geo%ew2(p%icell%i2 + 1))
                      else
  -                      call insert_t(t1, 2, +1, geo%ew2(p%icell%i2+1))
  +                      call insert_t(t1, 2, +1, geo%ew2(p%icell%i2 + 1))
                      end if
                   else
  -                   call insert_t(t1,2, +1,geo%ew2(p%icell%i2+1))
  -                   call insert_t(t2,2, +1,geo%ew2(p%icell%i2+1))
  +                   call insert_t(t1, 2, +1,geo%ew2(p%icell%i2 + 1))
  +                   call insert_t(t2, 2, +1,geo%ew2(p%icell%i2 + 1))
                   end if
   
                else if(abs(pB) .gt. 0._dp) then  ! Solve bx + c = 0
   
                   ! If the photon is on the wall, then we don't add any intersections
  -                if(p%on_wall_id%w2 /= +1) call insert_t(-pC/pB,2, +1, geo%ew2(p%icell%i2+1))
  +                if(p%on_wall_id%w2 /= +1) call insert_t(-pC / pB, 2, +1, geo%ew2(p%icell%i2 + 1))
   
                end if
   
  
positive.code:           else
  
               ! Compute the full intersections. Find the coefficients of the quadratic equation
               pA=v2_xy-v2_z*geo%wtant2(p%icell%i2)
               pB=rv_xy-rv_z*geo%wtant2(p%icell%i2) ; pB = pB + pB
               pC=r2_xy-r2_z*geo%wtant2(p%icell%i2)
  
               if(abs(pA) .gt. 0._dp) then  ! Solve ax^2 + bx + c = 0
  
                  ! Compute the full quadratic solutions
                  call quadratic(pA,pB,pC,t1,t2)
  
                  ! Check if the solutions are on the right side of the
                  ! mid-plane. The equation of the cone (z^2 = x^2 + y^2) does
  
negative.code: 
            ! If the wall is the midplane wall, we can just treat it as a
            ! plane, so don't need to do any fancy calculations.
            if(p%icell%i2 == geo%midplane .and. p%v%z .ne. 0) then
  
               ! If the photon is on the wall, then we don't add any intersections
               if(p%on_wall_id%w2 /= -1) call insert_t(-p%r%z/p%v%z,2, -1, geo%ew2(p%icell%i1))
  