mirror of
https://github.com/hannobraun/Fornjot
synced 2025-09-02 07:26:26 +00:00
Add comment
This commit is contained in:
parent
ce5a882793
commit
c5c7f76f45
@ -59,6 +59,14 @@ impl Sketch {
|
|||||||
* radius.sign().to_scalar();
|
* radius.sign().to_scalar();
|
||||||
|
|
||||||
let distance_from_midpoint_to_center = {
|
let distance_from_midpoint_to_center = {
|
||||||
|
// We're computing the required distance from a
|
||||||
|
// right triangle:
|
||||||
|
// - `a` (leg): `midpoint` to `end`
|
||||||
|
// - `b` (leg): `midpoint` to circle center (the
|
||||||
|
// distance we're looking for)
|
||||||
|
// - `c` (hypotenuse): `end` to circle center (which
|
||||||
|
// is `radius`)
|
||||||
|
|
||||||
let d = start_to_end.magnitude() / 2.;
|
let d = start_to_end.magnitude() / 2.;
|
||||||
let distance_square = radius * radius - d * d;
|
let distance_square = radius * radius - d * d;
|
||||||
distance_square.sqrt()
|
distance_square.sqrt()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user