npm i @cypher_077/mathabs(x)	Returns the absolute value of x
acos(x)	Returns the arccosine of x, in radians
acosh(x)	Returns the hyperbolic arccosine of x
asin(x)	Returns the arcsine of x, in radians
asinh(x)	Returns the hyperbolic arcsine of x
atan(x)	Returns the arctangent of x as a numeric value between -PI/2 and PI/2 radians
atan2(y, x)	Returns the arctangent of the quotient of its arguments
atanh(x)	Returns the hyperbolic arctangent of x
cbrt(x)	Returns the cubic root of x
ceil(x)	Returns x, rounded upwards to the nearest integer
cos(x)	Returns the cosine of x (x is in radians)
cosh(x)	Returns the hyperbolic cosine of x
exp(x)	Returns the value of Ex
floor(x)	Returns x, rounded downwards to the nearest integer
log(x)	Returns the natural logarithm (base E) of x
max(x, y, z, ..., n)	Returns the number with the highest value
min(x, y, z, ..., n)	Returns the number with the lowest value
pow(x, y)	Returns the value of x to the power of y
random()	Returns a random number between 0 and 1
round(x)	Rounds x to the nearest integer
sin(x)	Returns the sine of x (x is in radians)
sinh(x)	Returns the hyperbolic sine of x
sqrt(x)	Returns the square root of x
tan(x)	Returns the tangent of an angle
tanh(x)	Returns the hyperbolic tangent of a number
trunc(x)	Returns the integer part of a number (x)JS Numbers and Math:

Number Properties:
MAX_VALUE
The maximum numeric value representable in JavaScript
MIN_VALUE
Smallest positive numeric value representable in JavaScript
NaN
The “Not-a-Number” value
NEGATIVE_INFINITY
The negative Infinity value
POSITIVE_INFINITY
Positive Infinity value

Number Methods:
toExponential()
Returns a string with a rounded number written as exponential notation
toFixed()
Returns the string of a number with a specified number of decimals
toPrecision()
String of a number written with a specified length
toString()
Returns a number as a string
valueOf()
Returns a number as a number

Math Properties:
E Euler’s number
LN2 The natural logarithm of 2
LN10 Natural logarithm of 10
LOG2E Base 2 logarithm of E
LOG10E Base 10 logarithm of E
PI The number PI
SQRT1_2 Square root of 1/2
SQRT2 The square root of 2

Math Methods:
abs(x)
Returns the absolute (positive) value of x
acos(x)
The arccosine of x, in radians
asin(x)
Arcsine of x, in radians
atan(x)
The arctangent of x as a numeric value
atan2(y,x)
Arctangent of the quotient of its arguments
ceil(x)
Value of x rounded up to its nearest integer
cos(x)
The cosine of x (x is in radians)
exp(x)
Value of Ex
floor(x)
The value of x rounded down to its nearest integer
log(x)
The natural logarithm (base E) of x
max(x,y,z,...,n)
Returns the number with the highest value
min(x,y,z,...,n)
Same for the number with the lowest value
pow(x,y)
X to the power of y
random()
Returns a random number between 0 and 1
round(x)
The value of x rounded to its nearest integer
sin(x)
The sine of x (x is in radians)
sqrt(x)
Square root of x
tan(x)
The tangent of an angleconst random = Math.random();
const randomMultiple = random * 10;
console.log(randomMultiple)
const randomFloor = Math.floor(randomMultiple);
console.log(randomFloor);
const randomCeil = Math.ceil(randomMultiple);
console.log(randomCeil)
const randomRound = Math.round(randomMultiple)
console.log(randomRound)

//Output:
// 2.545754647061882 randomMultiple
// 2 randomFloor
// 3 randomCeil
// 3 randomRound function sum(a, b) {
  return a + b;
}

function subtract(a, b) {
  return a - b;
}

function multiply(a, b) {
  return a * b;
}

function divide(a, b) {
  if (b === 0) {
    console.log("can't divide by zero");
  }

  if (a === 0 && b === 0) {
    console.log("undetermined");
  }

  //or this without any IFs
  return a / b;
}
abs(x)	               //Returns the absolute value of x
acos(x)	               //Returns the arccosine of x, in radians
acosh(x)	           //Returns the hyperbolic arccosine of x
asin(x)	               //Returns the arcsine of x, in radians
asinh(x)	           //Returns the hyperbolic arcsine of x
atan(x)	               //Returns the arctangent of x as a numeric value between -PI/2 and PI/2 radians
atan2(y, x)	           //Returns the arctangent of the quotient of its arguments
atanh(x)	           //Returns the hyperbolic arctangent of x
cbrt(x)	               //Returns the cubic root of x
ceil(x)	               //Returns x, rounded upwards to the nearest integer
cos(x)	               //Returns the cosine of x (x is in radians)
cosh(x)	               //Returns the hyperbolic cosine of x
exp(x)	               //Returns the value of Ex
floor(x)	           //Returns x, rounded downwards to the nearest integer
log(x)	               //Returns the natural logarithm (base E) of x
max(x, y, z, ..., n)   //Returns the number with the highest value
min(x, y, z, ..., n)   //Returns the number with the lowest value
pow(x, y)	           //Returns the value of x to the power of y
random()	           //Returns a random number between 0 and 1
round(x)	           //Rounds x to the nearest integer
sign(x)	               //Returns if x is negative, null or positive (-1, 0, 1)
sin(x)	               //Returns the sine of x (x is in radians)
sinh(x)	               //Returns the hyperbolic sine of x
sqrt(x)	               //Returns the square root of x
tan(x)	               //Returns the tangent of an angle
tanh(x)	               //Returns the hyperbolic tangent of a number
trunc(x)	           //Returns the integer part of a number (x)function count(string) {
  let string1 = string.split("").sort().join("");
  let counter = 1;
  for (let i = 0; i < string.length; i++) {
    if (string1[i] == string1[i + 1]) {
      counter++;
    } else {
      console.log(string1[i] + " " + counter);
      counter = 1;
    }
  }
}
count("thequickbrownfoxjumpsoverthelazydog");
 Run code snippet// Example: Rounding a number using Math.round()
const number = 3.7;
const roundedNumber = Math.round(number);
console.log(roundedNumber); // Output: 4

Shell/Bash相关代码片段

matlab install toolbox

how to open matlab after installation

matlab installation key

rebasing git

how to check if apache is installed

install dual boot ubuntu windows 10

yay install pip

Hold linux kernel packages

Install apache utils

Install necessary software properties

Configure automatic restart

list pods all namespaces

Change remote origin url

echo path replace : with linebreak

git unstage all

install miniconda

docker keeps creating new containers

set git credentials with access token

docker ststus

instalar insomnia linux

install jenkins docker

install docker debian 5

AddDbContext

AddNewtonsoftJson

zip except folder

install openmpi ubuntu

remove anydesk from startup linux

stabalize a linux shell with one python command

move images without registry

composer drupal installation

remove bash history forever

docker compose pull latest image

windows create shortcut that rins cmd

ubuntu cannot play mp4 video

install jupyter kernel

wsl networking becomes slow windows 10

dynamic python aliases on mac

git remove file from gitirgnore

croc zsh autocomplete fix

src refspec does not match any : git push error

cannot install lap

npm status codes

pm2 in cronjob

convert raw to qcow2 qemu-img

add passphrase to ssh key

linux flush write cache

connect to gitlab without password using ssh

alias linux command

install dbt

longhorn in eks error install open iscsi

npm install prod only

permission denied: ./

vite react install

gnome workspace rename

connect to wifi using linux terminal

B188E2B695BD4743

trouble.nvim

sign_and_send_pubkey: signing failed for ed25519

how to kill all the processon gpu in linux

selenium auto install chrome driver

sed replace space with newline

how to reoload bashrc

Git Cheat sheet

reset migrations and db prisma

prisma force restart

shutdown server remote

install hiddify

redo git commit

how to install wine in fedora39

docker alpine

apt packages kept back

git revert last commit after push

crontab restart

crontab start

crontab stop

easily create https localhost

allow trafic to specific port from host ufw rule

update unturned server

Ionic - Sync changes to android/ios platforms

Ionic - Generate www folder