Skip to content

Commit 05893b3

Browse files
committed
use lib function to convert from deg to rad
1 parent bd379f8 commit 05893b3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/plots/cartesian/autorange.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -231,9 +231,9 @@ function makePadFn(ax, max) {
231231

232232
var morePad = 0;
233233
if(anchorAxis._vals) {
234-
var A = (anchorAxis._tickAngles[anchorAxis._id + 'tick'] || 0) * Math.PI / 180;
235-
var cosA = Math.abs(Math.cos(A));
236-
var sinA = Math.abs(Math.sin(A));
234+
var rad = Lib.deg2rad(anchorAxis._tickAngles[anchorAxis._id + 'tick'] || 0);
235+
var cosA = Math.abs(Math.cos(rad));
236+
var sinA = Math.abs(Math.sin(rad));
237237

238238
// use bounding boxes
239239
morePad = 0;

0 commit comments

Comments
 (0)