Circle Calculater

This script make the nice environment of calculate circles for console of the developer tools.

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name Circle Calculater
// @description This script make the nice environment of calculate circles for console of the developer tools.
// @version 1.0.1
// @author Mike Michael
// @match http://*
// @match https://*
// @grant none
// @namespace https://github.com/Mike-Michael/
// @namespace https://greasyfork.org/en/users/311628/mike-michael/
// ==/UserScript==
'use strict'

var π = Math.PI;

let circleAreaCalculater = (rad) => {
    console.log(rad * rad * π);
};

// ↑ That function calculates area of the circle. ↑

let circumferentialLengthCalculater = (dia) => {
    console.log(dia * π);
};

// ↑ That function calculates circumferential length of the circle. ↑

circleAreaCalculater(3);

// ↑ That code calls the function and sent "3" to the argument of the function, so the circle radius is 3. please change the value of the argument for you want to calculate circle's radius. ↑

circumferentialLengthCalculater(6);

// ↑ That code calls the function and sent "6" to the argument of the function, so the circle diameter is 6. please change the value of the argument for you want to calculate circle's diameter. ↑