3 ms·
made a PR for raku, hope it gets accepted some cool things stood out: sub fixangle($a) { $a mod 360 } # raku has built-in support for Euclidean modulo
by librasteve 1y ago
made a PR for raku, hope it gets accepted
some cool things stood out:
sub fixangle($a) { $a mod 360 } # raku has built-in support for Euclidean modulo
pi # raku has pi
# Solve equation of Kepler
my $e = $M;
my $delta;
repeat { # raku's repeat loop allows initialisation of delta to be folded in
$delta = $e - $eccent * sin($e) - $M;
$e -= $delta / (1 - $eccent * cos($e));
} while abs($delta) > 1e-6;
- eddyg 1y agoThanks! (I'm a big fan of Raku; it doesn't get nearly the respect it deserves!)
- oliverkwebb 1y agoThank you! I accepted it
- librasteve 1y agoyay - it has made it to raku module status https://raku.land/zef:librasteve/Moonphase https://raku.land/zef:librasteve/Moonphase