Skip to content

Commit

Permalink
fix a few closure compiler errors
Browse files Browse the repository at this point in the history
  • Loading branch information
flyover committed Apr 14, 2016
1 parent 7319dbd commit dbfb8a9
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions spine.js
Original file line number Diff line number Diff line change
Expand Up @@ -467,18 +467,24 @@ spine.Angle = function(rad) {
this.rad = rad || 0;
}

/** @type {number} */
spine.Angle.prototype.deg;
Object.defineProperty(spine.Angle.prototype, 'deg', {
/** @this {spine.Angle} */
get: function() { return this.rad * 180 / Math.PI; },
/** @this {spine.Angle} */
set: function(value) { this.rad = value * Math.PI / 180; }
});

/** @type {number} */
spine.Angle.prototype.cos;
Object.defineProperty(spine.Angle.prototype, 'cos', {
/** @this {spine.Angle} */
get: function() { return Math.cos(this.rad); }
});

/** @type {number} */
spine.Angle.prototype.sin;
Object.defineProperty(spine.Angle.prototype, 'sin', {
/** @this {spine.Angle} */
get: function() { return Math.sin(this.rad); }
Expand Down Expand Up @@ -813,7 +819,7 @@ spine.Matrix.scale = function(m, x, y, out) {
}

/**
* @return {spine.Matrix}
* @return {spine.Vector}
* @param {spine.Matrix} m
* @param {spine.Vector} v
* @param {spine.Vector=} out
Expand All @@ -827,7 +833,7 @@ spine.Matrix.transform = function(m, v, out) {
}

/**
* @return {spine.Matrix}
* @return {spine.Vector}
* @param {spine.Matrix} m
* @param {spine.Vector} v
* @param {spine.Vector=} out
Expand Down Expand Up @@ -904,7 +910,7 @@ spine.Affine.transform = function(affine, v, out) {

/**
* @return {spine.Vector}
* @param {spine.Affine} space
* @param {spine.Affine} affine
* @param {spine.Vector} v
* @param {spine.Vector=} out
*/
Expand Down

0 comments on commit dbfb8a9

Please sign in to comment.