Vector quantization (VQ) is an essential tool in signal processing. Although many algorithms for vector quantizer design have been developed, the classical generalized Lloyd algorithm (GLA) is still widely used, mainly for its simplicity and relatively good performance. Using law of cosines this letter presents a simple improved method for nearest-neighbor search in GLA. Experiments show that the proposed algorithm outperforms the traditional GLA.Index Terms-Fast nearest-neighbor search, law of cosines, vector quantization.