Hack for LawOfCosines calculator performance