Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(514)

Side by Side Diff: samples/solar/solar.dart

Issue 10829459: Deprecate Math object in corelib in favor of dart:math library. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address review comments. Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « samples/matrix/matrix_server.dart ('k') | samples/spirodraw/Spirodraw.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 /** 5 /**
6 * A solar system visualization. 6 * A solar system visualization.
7 */ 7 */
8 8
9 #library("solar"); 9 #library("solar");
10 10
11 #import("dart:html"); 11 #import("dart:html");
12 #import("dart:math", prefix: "Math");
12 13
13 /** 14 /**
14 * The entry point to the application. 15 * The entry point to the application.
15 */ 16 */
16 void main() { 17 void main() {
17 var solarSystem = new SolarSystem(query("#container")); 18 var solarSystem = new SolarSystem(query("#container"));
18 19
19 solarSystem.start(); 20 solarSystem.start();
20 } 21 }
21 22
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 } else { 261 } else {
261 num angle = solarSystem.renderTime * orbitSpeed; 262 num angle = solarSystem.renderTime * orbitSpeed;
262 263
263 return new Point( 264 return new Point(
264 orbitRadius * Math.cos(angle) + x, 265 orbitRadius * Math.cos(angle) + x,
265 orbitRadius * Math.sin(angle) + y); 266 orbitRadius * Math.sin(angle) + y);
266 } 267 }
267 } 268 }
268 269
269 } 270 }
OLDNEW
« no previous file with comments | « samples/matrix/matrix_server.dart ('k') | samples/spirodraw/Spirodraw.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698