Duration: 16 minutes
Summary: In this video we wrap up our discussion on regular expressions for now and introduce the Math object. The last functionality we talked about for regular expressions has to do with fixing a name to change it from one format to another. The name was in the format “lastname,firstname”. We used (\w*),(\w*) to match alphanumeric ([A-Za-z0-9]) characters and change them to “firstname lastname”. Then, we talked about the Math object and its static functions. We can call the functions inside the Math object directly without instantiating a new object (using the new operator). The Math functions we covered are: random (to generate a random number between 0 and 1; this is important for game programming), floor, ceil, pow, abs, sin and cos (trigonometric functions).
Methodology of the development of example: Good coding standard and simplified design.