Results 1 to 3 of 3

Thread: Problem with CL_Vec2i::angle

  1. #1
    Lesser Knight
    Join Date
    May 2010
    Posts
    32

    Default Problem with CL_Vec2i::angle

    Hello, everyone. I have problem with CL_Vec2i::angle.

    PHP Code:
    CL_Vec2i Coord1(100100);
    CL_Vec2i Coord2(300300);

    CL_Angle Angle Coord2.angle(Coord1); 
    Angle.to_degrees() - return 0 =(

    Thnx for help.

  2. #2
    ClanLib Developer
    Join Date
    May 2007
    Posts
    1,824

    Default

    It should be 0, shouldn't it ?

    CL_Vec's are vectors. i.e. "A quantity having direction as well as magnitude"

    So imagine, relative to zero, we have 2 vectors

    A) 100, 100
    B) 300, 300

    Since B is a multiple of A, it has the same direction. Thus, the angle between them is 0 degrees.

  3. #3
    Lesser Knight
    Join Date
    May 2010
    Posts
    32

    Default

    Quote Originally Posted by rombust View Post
    It should be 0, shouldn't it ?

    CL_Vec's are vectors. i.e. "A quantity having direction as well as magnitude"

    So imagine, relative to zero, we have 2 vectors

    A) 100, 100
    B) 300, 300

    Since B is a multiple of A, it has the same direction. Thus, the angle between them is 0 degrees.
    ups. Im srry. thnx for help

Similar Threads

  1. Problem: Sprite's share angle even when cloned
    By Nightwind0 in forum Official ClanLib SDK Forums
    Replies: 3
    Last Post: 10-11-2010, 06:02 AM

Bookmarks

Bookmarks

Posting Permissions

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