Remove goog.math angle functions.

This commit is contained in:
Neil Fraser
2018-06-28 15:44:33 -07:00
committed by Neil Fraser
parent eea2794e38
commit 60cce6cd0c
4 changed files with 28 additions and 10 deletions

View File

@@ -30,8 +30,6 @@ goog.require('Blockly.utils');
goog.require('Blockly.VariableMap');
goog.require('Blockly.WorkspaceComment');
goog.require('goog.math');
/**
* Class for a workspace. This is a data structure that contains blocks.
@@ -176,7 +174,8 @@ Blockly.Workspace.prototype.getTopBlocks = function(ordered) {
// Copy the topBlocks_ list.
var blocks = [].concat(this.topBlocks_);
if (ordered && blocks.length > 1) {
var offset = Math.sin(goog.math.toRadians(Blockly.Workspace.SCAN_ANGLE));
var offset =
Math.sin(Blockly.utils.toRadians(Blockly.Workspace.SCAN_ANGLE));
if (this.RTL) {
offset *= -1;
}
@@ -232,7 +231,8 @@ Blockly.Workspace.prototype.getTopComments = function(ordered) {
// Copy the topComments_ list.
var comments = [].concat(this.topComments_);
if (ordered && comments.length > 1) {
var offset = Math.sin(goog.math.toRadians(Blockly.Workspace.SCAN_ANGLE));
var offset =
Math.sin(Blockly.utils.toRadians(Blockly.Workspace.SCAN_ANGLE));
if (this.RTL) {
offset *= -1;
}