Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
minseo0388 committed May 4, 2021
1 parent edb0c45 commit 0e22a55
Show file tree
Hide file tree
Showing 26 changed files with 146 additions and 156 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ For more information, contact minseo0388@daum.net or 129dot03@kakao.com.

**Published as `Naesungmath` at npmjs.org**

**최신 안정화 버전은 `2.0.0` 입니다.**
**최신 안정화 버전은 `2.1.0` 입니다.**

**The latest stabilized version is `2.0.0`.**
**The latest stabilized version is `2.1.0`.**

### Update Notice

Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "naesungmath",
"version": "2.0.0",
"version": "2.1.0",
"description": "Math and Science",
"main": "/src/math.js",
"scripts": {
Expand Down
22 changes: 11 additions & 11 deletions src/2d/circle/circle.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* @return {number} Inscribed circle and triangle area formula
*
*/
exports.inscribedCircleTriangleArea = function (a, b, c, r) {
export function inscribedCircleTriangleArea(a, b, c, r) {
return (((a + b + c) / 2) * r)
}

Expand All @@ -24,7 +24,7 @@ exports.inscribedCircleTriangleArea = function (a, b, c, r) {
* @return {number} Inscribed circle and triangle area formula
*
*/
exports.circumscribedCircleTriangleArea_Side = function (a, b, c, r) {
export function circumscribedCircleTriangleArea_Side(a, b, c, r) {
return (a * b * c / 4 / r)
}

Expand All @@ -39,7 +39,7 @@ exports.circumscribedCircleTriangleArea_Side = function (a, b, c, r) {
* @return {number} Inscribed circle and triangle area formula
*
*/
exports.circumscribedCircleTriangleArea_Angle = function (a, b, c, r) {
export function circumscribedCircleTriangleArea_Angle(a, b, c, r) {
return (2 * r * r * (Math.sin(a)) * (Math.sin(b)) * (Math.sin(c)))
}

Expand All @@ -51,7 +51,7 @@ exports.circumscribedCircleTriangleArea_Angle = function (a, b, c, r) {
* @return {number} The area of circle
*
*/
exports.circleArea = function (r) {
export function circleArea(r) {
return ((Math.PI) * (r ** 2))
}

Expand All @@ -63,7 +63,7 @@ exports.circleArea = function (r) {
* @return {number} The circumstance of circle
*
*/
exports.circlePerimeter = function (r) {
export function circlePerimeter(r) {
return (2 * (Math.PI) * r)
}

Expand All @@ -75,7 +75,7 @@ exports.circlePerimeter = function (r) {
* @return {number} The center angle of circumferential angle
*
*/
exports.circumference = function (a) {
export function circumference(a) {
return (2 * a)
}

Expand All @@ -88,7 +88,7 @@ exports.circumference = function (a) {
* @return {number} The center angle of sector form (radian)
*
*/
exports.circularSectorAngle = function (r, l) {
export function circularSectorAngle(r, l) {
return (l / r)
}

Expand All @@ -101,7 +101,7 @@ exports.circularSectorAngle = function (r, l) {
* @return {number} THe area of sector form
*
*/
exports.circularSectorArea_rt = function (r, t) {
export function circularSectorArea_rt(r, t) {
return (0.5 * r * (t ** 2))
}

Expand All @@ -114,7 +114,7 @@ exports.circularSectorArea_rt = function (r, t) {
* @return {number} The area of sector form
*
*/
exports.circularSectorArea_rl = function (r, l) {
export function circularSectorArea_rl(r, l) {
return (0.5 * r * l)
}

Expand All @@ -127,7 +127,7 @@ exports.circularSectorArea_rl = function (r, l) {
* @return {number} The length of arc
*
*/
exports.arcLength = function (r, l) {
export function arcLength(r, l) {
return (r * l)
}

Expand All @@ -139,6 +139,6 @@ exports.arcLength = function (r, l) {
* @return {number} Convert degree to radian
*
*/
exports.degreeToRad = function (deg) {
export function degreeToRad(deg) {
return deg * Math.PI / 180
}
2 changes: 1 addition & 1 deletion src/2d/hexagon/hexagon.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
* @return {number} The area of hexagon with on side a
*
*/
exports.hexagonArea = function (a) {
export function hexagonArea(a) {
return ((3 * ((3) ^ 0.5)) / 2) * (a ** 2)
}
4 changes: 2 additions & 2 deletions src/2d/oval/oval.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @return {number} The area of eval
*
*/
exports.ovalArea = function (a, b) {
export function ovalArea(a, b) {
return ((Math.PI) * a * b)
}

Expand All @@ -20,6 +20,6 @@ exports.ovalArea = function (a, b) {
* @return {number} THe eccentricity of eval
*
*/
exports.evalEccentricity = function (a, b) {
export function evalEccentricity(a, b) {
return ((1 - ((b ** 2) / (a ** 2))) ** 0.5)
}
6 changes: 3 additions & 3 deletions src/2d/pentagon/pentagon.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @return {number} The height of pentagon with side a
*
*/
exports.pentagonArea = function (a) {
export function pentagonArea(a) {
return ((((a) ** 2) / 4) * ((25 + 10((5) ** 0.5)) ** 0.5))
}

Expand All @@ -18,7 +18,7 @@ exports.pentagonArea = function (a) {
* @return {number} The length of height of pentagon
*
*/
exports.pentagonHeight = function (a) {
export function pentagonHeight(a) {
return (((25 + 10 * ((5) ** 0.5)) / 2) * (a))
}

Expand All @@ -30,7 +30,7 @@ exports.pentagonHeight = function (a) {
* @return {number} The length of digonal of pentagon
*
*/
exports.pentagonDiagonal = function (a) {
export function pentagonDiagonal(a) {
// ������ ���ε� ������ ���̶� �ۼ�//
return ((1 + ((5) ** 0.5) / 2) * (a))
}
12 changes: 6 additions & 6 deletions src/2d/polygon/polygon.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @return {number} The number of diagonal of polygon
*
*/
exports.polydiag = function (n) {
export function polydiag(n) {
return (n * (n - 3) / 2)
}

Expand All @@ -18,7 +18,7 @@ exports.polydiag = function (n) {
* @return {number} The sum of the polygons cabinet (degree)
*
*/
exports.polyAngleSumDeg = function (n) {
export function polyAngleSumDeg(n) {
return (180 * (n - 2))
}

Expand All @@ -30,7 +30,7 @@ exports.polyAngleSumDeg = function (n) {
* @return {number} The sum of the polygons cabinet (radian)
*
*/
exports.polyAngleSumRad = function (n) {
export function polyAngleSumRad(n) {
return ((Math.PI) * (n - 2))
}

Expand All @@ -43,7 +43,7 @@ exports.polyAngleSumRad = function (n) {
* @return {number} The area of regular polygons
*
*/
exports.polyarea = function (n, a) {
export function polyarea(n, a) {
return n * (a ** 2) / (4 * (Math.tan(a / (Math.PI))))
}

Expand All @@ -55,7 +55,7 @@ exports.polyarea = function (n, a) {
* @return {number} The sum of cabinet of polygon (degree)
*
*/
exports.polyAngle_Deg = function (n) {
export function polyAngle_Deg(n) {
return (180 * (n - 2) / n)
}

Expand All @@ -67,6 +67,6 @@ exports.polyAngle_Deg = function (n) {
* @return {number} The sum of cabinet of polygon (radian)
*
*/
exports.polyAngle_Rad = function (n) {
export function polyAngle_Rad(n) {
return ((Math.PI) * (n - 2) / n)
}
16 changes: 8 additions & 8 deletions src/2d/rectangle/rectangle.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @return {number} The area of parallelogram
*
*/
exports.parallelogramArea = function (a, h) {
export function parallelogramArea(a, h) {
return (a * h)
}
/**
Expand All @@ -19,7 +19,7 @@ exports.parallelogramArea = function (a, h) {
* @return {number} THe area of rectangle with the side is a, b
*
*/
exports.rectangleArea = function (a, b) {
export function rectangleArea(a, b) {
return (a * b)
}
/**
Expand All @@ -31,7 +31,7 @@ exports.rectangleArea = function (a, b) {
* @return {number} Pythagoras Theorem
*
*/
exports.rectangleDiagonal = function (a, b) {
export function rectangleDiagonal(a, b) {
return (((a) ** 2 + (b) ** 2) ** 0.5)
}
/**
Expand All @@ -43,7 +43,7 @@ exports.rectangleDiagonal = function (a, b) {
* @return {number} The circumstance of rectangle with the side is a, b
*
*/
exports.rectanglePerimeter = function (a, b) {
export function rectanglePerimeter(a, b) {
return ((a) * 2 + (b) * 2)
}
/**
Expand All @@ -55,7 +55,7 @@ exports.rectanglePerimeter = function (a, b) {
* @return {number} The area of rhombus with digonal a, b
*
*/
exports.rhombusArea = function (a, b) {
export function rhombusArea(a, b) {
return (0.5 * (a) * (b))
}
/**
Expand All @@ -66,7 +66,7 @@ exports.rhombusArea = function (a, b) {
* @return {number} Area of a square with one side a
*
*/
exports.square = function (a) {
export function square(a) {
return (a ** 2)
}
/**
Expand All @@ -79,7 +79,7 @@ exports.square = function (a) {
* @return {number} The area of square
*
*/
exports.squareArea = function (a, b, t) {
export function squareArea(a, b, t) {
return (0.5 * (a) * (b) * (Math.sin(t)))
}
/**
Expand All @@ -92,6 +92,6 @@ exports.squareArea = function (a, b, t) {
* @return {number} The area of trapezoid
*
*/
exports.trapezoidArea = function (a, b, h) {
export function trapezoidArea(a, b, h) {
return (0.5 * (a + b) * h)
}
24 changes: 0 additions & 24 deletions src/2d/triangle/pytagoras_004.js

This file was deleted.

Loading

0 comments on commit 0e22a55

Please sign in to comment.