Skip to content

Commit

Permalink
Rename TWO_PI to twoPi to be consistent with other similar constants
Browse files Browse the repository at this point in the history
  • Loading branch information
Tetramputechture authored and cahilfoley committed Sep 6, 2024
1 parent ee7a8c7 commit 8ec8655
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/react-snowfall/src/Snowflake.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import isEqual from 'react-fast-compare'
import { lerp, random, randomElement, TWO_PI } from './utils.js'
import { lerp, random, randomElement, twoPi } from './utils.js'

export interface SnowflakeProps {
/** The color of the snowflake, can be any valid CSS color. */
Expand Down Expand Up @@ -230,7 +230,7 @@ class Snowflake {
*/
public drawCircle(ctx: CanvasRenderingContext2D): void {
ctx.moveTo(this.params.x, this.params.y)
ctx.arc(this.params.x, this.params.y, this.params.radius, 0, TWO_PI)
ctx.arc(this.params.x, this.params.y, this.params.radius, 0, twoPi)
}

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/react-snowfall/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@ export function getSize(element?: HTMLElement | null) {
*
* This is so we can avoid calculating this value every time we draw a circle.
*/
export const TWO_PI = Math.PI * 2
export const twoPi = Math.PI * 2

0 comments on commit 8ec8655

Please sign in to comment.