Saturday, July 26, 2014

Math Object

-Remember:

  • Objects are like variables but they have properties and methods and we know how to use them and if you didnt read that article Go here: Objects in Javascipts
-Math object:

  • its a speical object with has a few methods about Mathematical things these methods and functions are already been written by the Javascript founders and they make it in an object just to make it easy for you to get access for this
-Math methods
         
     1.min(x1,x2,x3..........xn): its a method"function" that returns the minimum number from a group of numbers

    2.max(x1,x2,x3,.........xn): it returns the maximum number from a group of numbers
    
    3.random():this will generate a radnom number
    
    4.sqrt(x): this method will give you the square root of the number

    5.sin(x) and cos(x): this will return the sine and cosine of x

    6.pow(x,y):the value of x power y 
 this will give you 25

-this was the most used Math methods and sure there's more but they arent that important just like these methods 
                           ......................thank you for coming here.................

No comments:

Post a Comment