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

Side by Side Diff: samples/matrix/float32.dart

Issue 10910013: Remove instances of dart:dom_deprecated from outside of lib/html and lib/dom. Part 1 of many. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 3 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
OLDNEW
(Empty)
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
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.
4
5 /**
6 * Emulates the browser's Float32Array (so Matrix4 can be used outside
7 * the browser.
8 * (Note this stores entries as 64-bit doubles, since there is no
9 * 32-bit float type on the vm.)
10 */
11 class Float32Array {
12 final List<double> buf;
13
14 Float32Array(int size) : buf = new List<double>(size) {
15 for (int i = 0; i < size; i++) {
16 buf[i] = 0.0;
17 }
18 }
19
20 double operator [](int i) {
21 return buf[i];
22 }
23
24 void operator []=(int i, num value) {
25 buf[i] = (value != null) ? value.toDouble() : 0.0;
26 }
27 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698