Skip to content

Commit

Permalink
Adjust logic
Browse files Browse the repository at this point in the history
  • Loading branch information
ts5h committed Sep 30, 2023
1 parent 3efa44f commit dd51187
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "biased_diamond_ring",
"version": "0.1.0",
"name": "biased_diamond_ring_2",
"version": "0.9.0",
"homepage": "./",
"private": true,
"dependencies": {
Expand Down
8 changes: 4 additions & 4 deletions src/components/BiasedDiamondRing/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ export const BiasedDiamondRing: FC = () => {
const cy = windowSize.height / 2;

let rx = Math.min(windowSize.width, windowSize.height) / 2;
let ry = Math.random() * (rx * 0.7) + rx * 0.3;
let ry = Math.random() * (rx * 0.65) + rx * 0.35;

if (rx / ry >= 0.98) {
rx *= 0.98;
ry *= 0.98;
if (rx / ry >= 0.99) {
rx *= 0.99;
ry *= 0.99;
}

const rotDeg = Math.random() * 360;
Expand Down

0 comments on commit dd51187

Please sign in to comment.