diff options
| author | Laurenz <laurmaedje@gmail.com> | 2021-08-21 19:08:47 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-08-21 19:08:47 +0200 |
| commit | c0377de653ed7c0ae0e253724cbbb622125fbd3f (patch) | |
| tree | d69237f632084f07ce04e6d877cdea451a03f295 /src/geom/path.rs | |
| parent | 0dd4ae0a7ac0c247078df492469ff20b8a90c886 (diff) | |
Shorter/clearer field name for geometry types
Size { width, height } => Size { w, h }
Spec { horizontal, vertical } => Spec { x, y }
Gen { cross, main } => Gen { inline, block }
Diffstat (limited to 'src/geom/path.rs')
| -rw-r--r-- | src/geom/path.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/geom/path.rs b/src/geom/path.rs index bb2832fd..f4e4a8b2 100644 --- a/src/geom/path.rs +++ b/src/geom/path.rs @@ -25,8 +25,8 @@ impl Path { /// Create a path that approximates an axis-aligned ellipse. pub fn ellipse(size: Size) -> Self { // https://stackoverflow.com/a/2007782 - let rx = size.width / 2.0; - let ry = size.height / 2.0; + let rx = size.w / 2.0; + let ry = size.h / 2.0; let m = 0.551784; let mx = m * rx; let my = m * ry; |
