×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Feb 2006
    Location
    Helsinki, Finland
    Posts
    168

    missing functions 'radians' and 'degrees' in math module

    Are they going to be implemented or is there some way I do these operations in pure python? This is really quite important for my current project.

    Angular conversion:

    degrees( x)
    Converts angle x from radians to degrees.

    radians( x)
    Converts angle x from degrees to radians.

    -Richard
    Nokia E66
    PyS60 1.4.4 final

  2. #2
    Super Contributor
    Join Date
    May 2006
    Location
    Oulu, Finland
    Posts
    622

    Re: missing functions 'radians' and 'degrees' in math module

    Hi RICH

    Cross products

    Code:
    import math
    
    def degrees( radian ):
        return ( 180*radian ) / math.pi
    
    def radians( degrees ):
        return ( math.pi*degrees ) / 180
    
    
    print radians( 180 )
    print degrees( math.pi )
    That should do the trick at least for now. Have fun
    LFD
    Devices:
    Nokia E61 3rd Edition - pys60 1.4.0

    Tips and modules:
    http://www.lfdm.net/thesis

  3. #3
    Registered User
    Join Date
    Feb 2006
    Location
    Helsinki, Finland
    Posts
    168

    Re: missing functions 'radians' and 'degrees' in math module

    Thanks very much for the quick answer
    Now I can continue my project as I intended to.

    -Richard
    Nokia E66
    PyS60 1.4.4 final

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×