luxeengine / alpha

alpha - deprecated 2015~2016. unrelated to the new engine! view the new engine here - https://luxeengine.com/
MIT License
565 stars 74 forks source link

Degrees or Radians #377

Closed buckle2000 closed 8 years ago

buckle2000 commented 8 years ago

Is there a way to change the whole luxe engine to use radians? Changing _180_OVER_PI to 1?

ruby0x1 commented 8 years ago

The concept is a bit strange as there isn't much in the way of predefined angle. Where are you finding degrees that doesn't have radians?

buckle2000 commented 8 years ago

Well, I just don't understand why there is both code for deg and rad:

    function set_rotation_z( _degrees:Float ) : Float {

        radians = Maths.radians(_degrees);

        return _degrees;

    } //set_rotation_z
ruby0x1 commented 8 years ago

Ah I see. There are many cases where degrees might be favoured over radians and vice versa. luxe is designed to facilitate, and this type of facilitation is a good example of facilitating a frequent need for 2D visuals. You just use whichever one is most appropriate for your situation, and internally everything is radians. Hope that helps clarify.