Skip to content

Commit

Permalink
Special cases working
Browse files Browse the repository at this point in the history
  • Loading branch information
jimlambert committed Sep 5, 2023
1 parent cb0cd02 commit 0a466aa
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions include/grid_synth/exact_synthesis.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,14 @@ namespace grid_synth {

// Returns known common cases for multiples of theta = pi/4. w =
// 1/(sqrt(omega)).
inline str_t check_common_cases(real_t theta, real_t eps) {
if(abs(theta-real_t("0.25")) < eps) {
inline str_t check_common_cases(real_t theta, const real_t& eps) {

while(theta > real_t("2"))
theta = theta - real_t("2");
while(theta < 0)
theta = theta + real_t("2");

if(abs(theta-real_t("0.25")) < eps) {
return "T w";
}
else if(abs(theta-real_t("0.5") < eps)) {
Expand Down

0 comments on commit 0a466aa

Please sign in to comment.