Alhazen wrote a work on Islamic theology in which he discussed prophethood and developed a system of philosophical criteria to discern its false claimants in his time. He also wrote a treatise entitled Finding the Direction of Qibla by Calculation in which he discussed finding the Qibla, where prayers (salat) are directed towards, mathematically.