    # File lib/facets/more/quaternion.rb, line 290
      def round_D4
        # round to D4 lattice
        r1=@re.round; a1=@im.round; b1=@jm.round; c1=@km.round;
        q1=Quaternion(r1,a1,b1,c1); d1=(q1-self).abs2
        if d1<=1/4; return q1; end
        if @re<r1; r2=r1-1/2; else r2=r1+1/2; end
        if @im<r1; a2=a1-1/2; else a2=a1+1/2; end
        if @jm<r1; b2=b1-1/2; else b2=b1+1/2; end
        if @km<r1; c2=c1-1/2; else c2=c1+1/2; end
        q2=Quaternion(r2,a2,b2,c2); d2=(q2-self).abs2
        if d1<=d2; return q1; else return q2; end
      end