Skip to content

Commit cb25c68

Browse files
authored
Mention sqrt() on the constants pages (mdn#19978)
1 parent f0648d8 commit cb25c68

File tree

2 files changed

+4
-0
lines changed
  • files/en-us/web/javascript/reference/global_objects/math

2 files changed

+4
-0
lines changed

files/en-us/web/javascript/reference/global_objects/math/sqrt1_2/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ The **`Math.SQRT1_2`** property represents the square root of 1/2 which is appro
1818

1919
## Description
2020

21+
`Math.SQRT1_2` is a constant and a more performant equivalent to [`Math.sqrt(0.5)`](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/sqrt).
22+
2123
Because `SQRT1_2` is a static property of `Math`, you always use it as `Math.SQRT1_2`, rather than as a property of a `Math` object you created (`Math` is not a constructor).
2224

2325
## Examples

files/en-us/web/javascript/reference/global_objects/math/sqrt2/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ The **`Math.SQRT2`** property represents the square root of 2, approximately 1.4
1818

1919
## Description
2020

21+
`Math.SQRT2` is a constant and a more performant equivalent to [`Math.sqrt(2)`](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/sqrt).
22+
2123
Because `SQRT2` is a static property of `Math`, you always use it as `Math.SQRT2`, rather than as a property of a `Math` object you created (`Math` is not a constructor).
2224

2325
## Examples

0 commit comments

Comments
 (0)