-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmath-object.html
More file actions
149 lines (133 loc) · 7.66 KB
/
math-object.html
File metadata and controls
149 lines (133 loc) · 7.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="Mark Otto, Jacob Thornton, and Bootstrap contributors">
<meta name="generator" content="Jekyll v4.1.1">
<title>Javascript Math Object</title>
<link rel="canonical" href="https://getbootstrap.com/docs/4.5/examples/jumbotron/">
<!-- Bootstrap core CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous">
<style>
.bd-placeholder-img {
font-size: 1.125rem;
text-anchor: middle;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
@media (min-width: 768px) {
.bd-placeholder-img-lg {
font-size: 3.5rem;
}
}
</style>
<!-- Custom styles for this template -->
<link href="jumbotron.css" rel="stylesheet">
</head>
<body>
<nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark">
<a class="navbar-brand" href="#">Codeup</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsExampleDefault" aria-controls="navbarsExampleDefault" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarsExampleDefault">
<ul class="navbar-nav mr-auto">
<li class="nav-item active">
<a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">JS</a>
</li>
<li class="nav-item">
<a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">MySQL</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="dropdown01" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Java</a>
<div class="dropdown-menu" aria-labelledby="dropdown01">
<a class="dropdown-item" href="#">Java I</a>
<a class="dropdown-item" href="#">Java II</a>
<a class="dropdown-item" href="#">Spring</a>
</div>
</li>
</ul>
<form class="form-inline my-2 my-lg-0">
<input class="form-control mr-sm-2" type="text" placeholder="Search" aria-label="Search">
<button class="btn btn-outline-success my-2 my-sm-0" type="submit">Search</button>
</form>
</div>
</nav>
<main role="main">
<!-- Main jumbotron for a primary marketing message or call to action -->
<div class="jumbotron">
<div class="container">
<h1 class="display-3">Math Object</h1>
<p class="lead">The Math object in Javascript allows us to perform mathematical functions on data without having to do them manually. This can be incredibly helpful when needing to display fun charts and graphs that display info about ecommerce sales, students' progress reports, and more.</p>
<p><a class="btn btn-primary btn-lg" href="https://java.codeup.com/javascript-i/objects/math/" role="button">Learn more »</a></p>
</div>
</div>
<div class="container">
<!-- Example row of columns -->
<div class="row">
<div class="col-md-4">
<h2>Math.random()</h2>
<p>The Math.random() function returns a floating-point, pseudo-random number in the range [0, 1] that is, from 0 (inclusive) up to but not including 1 (exclusive), which you can then scale to your desired range.</p>
<p><a class="btn btn-secondary" href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/random" role="button">View details »</a></p>
</div>
<div class="col-md-4">
<h2>Math.round()</h2>
<p>The Math.round() function returns the value of a number rounded to the nearest integer.</p>
<p><a class="btn btn-secondary" href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/round" role="button">View details »</a></p>
</div>
<div class="col-md-4">
<h2>Math.floor()</h2>
<p>The Math.floor() function returns the largest integer less than or equal to a number.</p>
<p><a class="btn btn-secondary" href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/floor" role="button">View details »</a></p>
</div>
</div>
<hr>
<div class="row mt-5">
<div class="col-md-4">
<h2>Math.ceil()</h2>
<p>The Math.ceil() function returns the smallest integer greater than or equal to a number.</p>
<p><a class="btn btn-secondary" href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/ceil" role="button">View details »</a></p>
</div>
<div class="col-md-4">
<h2>Math.pow()</h2>
<p>The Math.pow() function returns the base to the exponent power, that is, base^exponent.</p>
<p><a class="btn btn-secondary" href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/pow" role="button">View details »</a></p>
</div>
<div class="col-md-4">
<h2>Math.sqrt()</h2>
<p>The Math.sqrt() function returns the square root of a number.</p>
<p><a class="btn btn-secondary" href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/sqrt" role="button">View details »</a></p>
</div>
</div>
<hr>
<div class="row mt-5">
<div class="col-md-6">
<h2>Math.E</h2>
<p>The Math.E property represents the base of natural logarithms, Euler's number, approximately 2.718.</p>
<p><a class="btn btn-secondary" href="https://youtu.be/m2MIpDrF7Es" role="button">View details »</a></p>
</div>
<div class="col-md-6">
<h2>Math.PI</h2>
<p>The Math.PI property represents the ratio of the circumference of a circle to its diameter, approximately 3.14159.</p>
<p><a class="btn btn-secondary" href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/PI" role="button">View details »</a></p>
</div>
</div>
<hr>
</div> <!-- /container -->
</main>
<footer class="container">
<p>© Codeup 2020</p>
</footer>
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js" integrity="sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js" integrity="sha384-B4gt1jrGC7Jh4AgTPSdUtOBvfO8shuf57BaghqFfPlYxofvL8/KUEfYiJOMMV+rV" crossorigin="anonymous"></script>
<script type="text/javascript" src="js/math-object-lec.js"></script>
</body>
</html>