History

Fix randFloat error in ac audio searcher

Ryan Huffman committed 9 years ago

Commit 9b098a41 parent 4bfb23b1 file · +5 −1Browse files

Showing the changes to tutorial/ACAudioSearchAndInject_tutorial.js (1 of 1 file). Show all

Unified · Split

tutorial/ACAudioSearchAndInject_tutorial.js+5−1
@@ -1,4 +1,5 @@
11 "use strict";
2+
23 /*jslint nomen: true, plusplus: true, vars: true*/
34 /*global AvatarList, Entities, EntityViewer, Script, SoundCache, Audio, print, randFloat*/
45 //
@@ -41,7 +42,6 @@ var DEFAULT_SOUND_DATA = { · 36 unmodified lines
4142 //var isACScript = this.EntityViewer !== undefined;
4243 var isACScript = true;
4344
44−Script.include("http://hifi-content.s3.amazonaws.com/ryan/development/utils_ryan.js");
4545 if (isACScript) {
4646 Agent.isAvatar = true; // This puts a robot at 0,0,0, but is currently necessary in order to use AvatarList.
4747 Avatar.skeletonModelURL = "http://hifi-content.s3.amazonaws.com/ozan/dev/avatars/invisible_avatar/invisible_avatar.fst";
@@ -51,6 +51,10 @@ function debug() { // Display the arguments not just [Object object]. · 3 unmodified lines
5151 //print.apply(null, [].map.call(arguments, JSON.stringify));
5252 }
5353
54+function randFloat(low, high) {
55+ return low + Math.random() * (high - low);
56+}
57+
5458 if (isACScript) {
5559 EntityViewer.setCenterRadius(QUERY_RADIUS);
5660 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t