diff --git a/doc/site/modules/core/num.markdown b/doc/site/modules/core/num.markdown index d1cb959c..51858d3f 100644 --- a/doc/site/modules/core/num.markdown +++ b/doc/site/modules/core/num.markdown @@ -84,6 +84,17 @@ System.print(1.5.floor) //> 1 System.print((-3.2).floor) //> -4 +### **fraction** + +The fractional part of a number i.e. the part after any decimal point. + +The returned value has the same sign as `this`. + +
+System.print(1.5.fraction)    //> 0.5
+System.print((-3.2).fraction) //> -0.2
+
+ ### **isInfinity** Whether the number is positive or negative infinity or not. @@ -164,6 +175,21 @@ The square root of the number. Returns `nan` if the number is negative. The tangent of the number. +### **toString** + +The string representation of the number. + +### **truncate** + +Rounds the number to the nearest integer towards zero. + +It is therefore equivalent to `floor` if the number is non-negative or `ceil` if it is negative. + +
+System.print(1.5.truncate)    //> 1
+System.print((-3.2).truncate) //> -3
+
+ ### **-** operator Negates the number.