mirror of
https://github.com/hannobraun/Fornjot
synced 2025-02-28 18:15:53 +00:00
Refactor
This commit is contained in:
parent
a6683aa19f
commit
dc2bfaa0bd
@ -34,10 +34,11 @@ impl Arc {
|
|||||||
let radius = distance_between_endpoints
|
let radius = distance_between_endpoints
|
||||||
/ (2. * (angle_rad.abs().into_f64() / 2.).sin());
|
/ (2. * (angle_rad.abs().into_f64() / 2.).sin());
|
||||||
|
|
||||||
|
let clockwise_turn = angle_rad <= Scalar::ZERO;
|
||||||
let more_than_half_turn = angle_rad.abs() > Scalar::PI;
|
let more_than_half_turn = angle_rad.abs() > Scalar::PI;
|
||||||
|
|
||||||
let center = {
|
let center = {
|
||||||
let f = match (angle_rad <= Scalar::ZERO, more_than_half_turn) {
|
let f = match (clockwise_turn, more_than_half_turn) {
|
||||||
(false, false) => Scalar::ONE,
|
(false, false) => Scalar::ONE,
|
||||||
(false, true) => -Scalar::ONE,
|
(false, true) => -Scalar::ONE,
|
||||||
(true, false) => -Scalar::ONE,
|
(true, false) => -Scalar::ONE,
|
||||||
|
Loading…
Reference in New Issue
Block a user