diff options
author | Keuin <[email protected]> | 2022-04-12 13:03:15 +0800 |
---|---|---|
committer | Keuin <[email protected]> | 2022-04-12 13:03:15 +0800 |
commit | d864f8b68dcf496f39fc0e12b1435b7d8ea46853 (patch) | |
tree | 3d4020e4657de03ce2cf749a994f25f202f59372 /main_simple_scanner.cpp | |
parent | 60a3e2aedda225591f10a360575250b201aadd53 (diff) |
Replace dot with mod2.
Diffstat (limited to 'main_simple_scanner.cpp')
-rw-r--r-- | main_simple_scanner.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/main_simple_scanner.cpp b/main_simple_scanner.cpp index 4d73d54..709914b 100644 --- a/main_simple_scanner.cpp +++ b/main_simple_scanner.cpp @@ -54,12 +54,12 @@ public: const auto c2s = r.source() - center; // center to source // A = D dot D - const double a = dot(r.direction(), r.direction()); + const double a = r.direction().mod2(); // H = (S - C) dot D const auto h = dot(c2s, r.direction()); // B = 2H ( not used in our optimized routine ) // C = (S - C) dot (S - C) - radius^2 - const double c = dot(c2s, c2s) - radius * radius; + const double c = c2s.mod2() - radius * radius; // 4delta = H^2 - AC // delta_q = H^2 - AC (quarter delta) const double delta_q = h * h - a * c; |