Math
Use the mathematics namespace with any of these names: Math
, গণিত
, Gonit
.
It includes common constants (π, e) and functions for rounding, powers/roots, logarithms, trigonometry, random numbers, and more.
Constants
- Math:
Math.E
,Math.PI
,Math.LOG10E
,Math.LOG2E
,Math.LN10
,Math.LN2
- Bangla:
গণিত.ই
,গণিত.পাই
,গণিত.লগ১০ই
,গণিত.লগ২ই
,গণিত.লএন১০
,গণিত.লএন২
- Banglish:
Gonit.e
,Gonit.pi
,Gonit.log10e
,Gonit.log2e
,Gonit.ln10
,Gonit.ln2
Functions (selection)
- Rounding:
abs
,ceil
,floor
,round
,trunc
- Powers/Roots:
pow
,sqrt
,cbrt
- Exponent/Log:
exp
,expm1
,log
,log10
,log1p
,log2
- Random/Range:
random
,min
,max
,hypot
,sign
,clz32
,imul
,fround
- Trig:
sin
,cos
,tan
,asin
,acos
,atan
,atan2
- Hyperbolic:
sinh
,cosh
,tanh
,asinh
,acosh
,atanh
- Optional:
f16round
(if present)
Examples
// (3,4) এর লম্ব ও 0..9 এর মধ্যে একটি এলোমেলো পূর্ণসংখ্যা
কনসোল.লগ(গণিত.লম্ব(3, 4)); // 5
কনসোল.লগ(গণিত.নিম্নমূল(গণিত.এলোমেলো() * 10)); // 0..9
// ধ্রুবক
কনসোল.লগ(গণিত.পাই.toFixed(3)); // "3.142"