Jump to content

Search the Community

Showing results for tags 'radians'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Standards
    • Coding and Game Design
    • Paid Promotion (Buy Banner)
  • Frameworks
    • Pixi.js
    • Phaser 3
    • Phaser 2
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
    • GameMonetize
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered
    • Marketplace (Sell Apps, Websites, Games)

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Twitter


Skype


Location


Interests

Found 1 result

  1. I'm thoroughly confused about radians and degrees! Been a long time since high school math I'd like to get the rotation of an object (currently being returned in radians), convert that to degrees, and allow for a variance of a few degrees. So a player is rotating the object to line it up with another object, and I'm checking that the rotation is correct. The rotation should be 180 deg, give or take a few degs (so 175 to 185 deg). However, my rotation is converting as where approx 185 is shows up as -175... Basically once it hits 180 it converts into a negative number, backwards from 180. I've got this.rot = rotationOfSprite; var degs = this.getDegrees(this.rot); console.log(degs); getDegrees: function(){ var degs = this.rot * 180/Math.PI; return degs; } SOLVED. Figured it out. Thanks (future ref: if(this.rot<0) this.rot +=2*Math.PI.
×
×
  • Create New...