Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Sep 2010

    Talking [newbie ask] normalize on pys60

    Greetings all, my difficulty when create the code of this algorithm:

    def Seek():
    DesiredVelocity= Normalize(TargetPos-VechilePos)*vechileMaxSpeed
    return SteeringForce

    i don't know how to do "normalize" on pys60 . Please help, thanks you

  2. #2
    Registered User
    Join Date
    Mar 2009

    Re: [newbie ask] normalize on pys60

    I the normalize that you want to use should be a function by its own eg
    def normalize(val):
        if val>50:val=50
        elif val<0:val=0
        return val
    You can now use this function to validate your values in your program.

  3. #3
    Registered User
    Join Date
    Sep 2010

    Thumbs up Re: [newbie ask] normalize on pys60

    Wouw, very helpful, thank you very much

Similar Threads

  1. Replies: 6
    Last Post: 2010-08-10, 21:34
  2. Replies: 0
    Last Post: 2010-04-02, 15:01
  3. PyS60 Talks #2 : PyS60 Extensions
    By croozeus in forum Symbian
    Replies: 14
    Last Post: 2008-09-15, 14:23
  4. How to backport unicodedata.normalize()
    By JOM in forum Symbian
    Replies: 3
    Last Post: 2008-04-28, 20:44
  5. Newbie Need Help
    By virgo in forum Bluetooth Technology
    Replies: 1
    Last Post: 2006-08-06, 07:08

Posting Permissions

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