Skip to content

Conversation

@not-fritos
Copy link
Member

No description provided.

@not-fritos not-fritos marked this pull request as draft June 17, 2025 02:07
@not-fritos not-fritos requested a review from Copilot June 17, 2025 02:08
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Adds a new constant for infinity alongside existing math constants.

  • Introduces INFINITY constant with a block representation of "∞"
  • Defines the value as the maximum finite double instead of true infinite

export const SQRT2 = 1.4142135623730951;
//% blockIdentity="Math._constant"
//% block="∞"
export const INFINITY = 1.7976931348623157e+308;
Copy link

Copilot AI Jun 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The value assigned here is the maximum finite double, not mathematical infinity. In JavaScript/TypeScript you can use Infinity or Number.POSITIVE_INFINITY, or rename this to MAX_VALUE if you intend the largest finite number.

Suggested change
export const INFINITY = 1.7976931348623157e+308;
export const INFINITY = Infinity;

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants