Skip to content

Commit

Permalink
refactor: fix typos with typos-cli
Browse files Browse the repository at this point in the history
I never knew I had many typos until I tried typos-cli by Ed Page.
All of them are valid typos; there are no false positives.
I will definitely embrace it in all my codebases.
  • Loading branch information
azzamsa committed Dec 8, 2023
1 parent 93b3d5f commit 234aa25
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions src/hijri/cal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ pub fn equation_of_time(julian_day: f32) -> f32 {
dsin(3.0 * g),
1.9148_f32.mul_add(dsin(g), 0.02 * dsin(2.0 * g)),
);
let lamda = 0.985_600_3_f32.mul_add(n, 280.47) + c;
let lambda = 0.985_600_3_f32.mul_add(n, 280.47) + c;
let r = 0.0014_f32.mul_add(
dsin(6.0 * lamda),
(-2.468_f32).mul_add(dsin(2.0 * lamda), 0.053 * dsin(4.0 * lamda)),
dsin(6.0 * lambda),
(-2.468_f32).mul_add(dsin(2.0 * lambda), 0.053 * dsin(4.0 * lambda)),
);
(c + r) * 4.0
}
Expand Down
6 changes: 3 additions & 3 deletions src/salah/method.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ use crate::salah::config::{Config, IshaInterval};
#[derive(PartialEq, Debug, Copy, Clone)]
pub enum Method {
/// University of Islamic Sciences, Karachi (UISK)
/// Ministry of Religious Affaires, Tunisia
/// Ministry of Religious Affairs, Tunisia
/// France - Angle 18°
Karachi,

/// Muslim World League (MWL)
/// Ministry of Religious Affaires and Awqaf, Algeria
/// Ministry of Religious Affairs and Awqaf, Algeria
/// Presidency of Religious Affairs, Turkey
MuslimWorldLeague,

Expand All @@ -25,7 +25,7 @@ pub enum Method {
/// French Muslims (ex-UOIF)
French,

/// Islamic Religious Council of Signapore (MUIS)
/// Islamic Religious Council of Singapore (MUIS)
/// Department of Islamic Advancements of Malaysia (JAKIM)
// Ministry of Religious Affairs of Indonesia (KEMENAG)
Singapore,
Expand Down
6 changes: 3 additions & 3 deletions src/salah/times.rs
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ impl PrayerTimes {
let middle_longitude = offset_hour as f32 * 15.0;
Ok((middle_longitude - location.longitude) / 15.0)
}
/// Get the angle angle for asr (according to choosen madhab)
/// Get the angle angle for asr (according to chosen madhab)
fn asr_angle(time: DateTime, location: Location, config: Config) -> Result<f32, crate::Error> {
let delta = Self::sun_declination(time)?;
let x = cal::dsin(location.latitude).mul_add(
Expand All @@ -282,8 +282,8 @@ impl PrayerTimes {
let epsilon = 23.44 - (0.000_000_4 * n);
let l = 0.985_647_4_f32.mul_add(n, 280.466);
let g = 0.985_600_3_f32.mul_add(n, 357.528);
let lamda = 0.02_f32.mul_add(cal::dsin(2.0 * g), 1.915_f32.mul_add(cal::dsin(g), l));
let x = cal::dsin(epsilon) * cal::dsin(lamda);
let lambda = 0.02_f32.mul_add(cal::dsin(2.0 * g), 1.915_f32.mul_add(cal::dsin(g), l));
let x = cal::dsin(epsilon) * cal::dsin(lambda);
Ok((180.0 / (4.0 * (1.0_f32).atan())) * (x / (-x).mul_add(x, 1.0).sqrt()).atan())
}
/// Remaining time to next prayer
Expand Down

0 comments on commit 234aa25

Please sign in to comment.