Page 4 - JavaScript
P. 4

Sine                                                                                                 27

        Cosine                                                                                               28

        Tangent                                                                                              28

          Rounding                                                                                            28

          Rounding                                                                                            29

          Rounding up                                                                                         29

          Rounding down                                                                                       29


          Truncating                                                                                          29
          Rounding to decimal places                                                                          30


          Random Integers and Floats                                                                          31

          Bitwise operators                                                                                   31

          Bitwise or                                                                                          31

          Bitwise and                                                                                         32

          Bitwise not                                                                                         32

          Bitwise xor (exclusive or)                                                                          32

          Bitwise left shift                                                                                  32

          Bitwise right shift >> (Sign-propagating shift) >>> (Zero-fill right shift)                         32

          Bitwise assignment operators                                                                        33

          Get Random Between Two Numbers                                                                      34

          Random with gaussian distribution                                                                   34

          Ceiling and Floor                                                                                   35

          Math.atan2 to find direction                                                                        36

          Direction of a vector                                                                               36

          Direction of a line                                                                                 36


          Direction from a point to another point                                                             36
          Sin & Cos to create a vector given direction & distance                                             36


          Math.hypot                                                                                          37

          Periodic functions using Math.sin                                                                   37

          Simulating events with different probabilities                                                      39

          Little / Big endian for typed arrays when using bitwise operators                                   40

          Getting maximum and minimum                                                                         41
   1   2   3   4   5   6   7   8   9