Profile Picture

NPointD class method not working

Posted By cho seongho 4 Years Ago
Author
Message
Nevron Support
Posted 4 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: 2 hours ago
Posts: 3,054, Visits: 4,009
Hi Cho,
Both methods work as expected:

   NPointD p1 = new NPointD(10.0, 10.0);

    // p1 X, Y does not change
    p1.Rotate(30.0);

Document
NameValueType
p1{{X=11.4228307398045,Y=-8.33780174205278}}Nevron.GraphicsCore.NPointD


    // p1 X, Y does not change
    p1.Translate(3.0, 3.0);

Document
NameValueType
p1{{X=14.4228307398045,Y=-5.33780174205278}}Nevron.GraphicsCore.NPointD

As you can see from the watch window in the debugger - please double-check how you use these methods and keep in mind that the NPointD is a structure so if you pass it by reference to a method the value will not change in the caller. Let us know if you meet any problems.





Best Regards,
Nevron Support Team



cho seongho
Problem Posted 4 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)

Group: Forum Members
Last Active: 3 Years Ago
Posts: 15, Visits: 73
I am using the NPointD data type.
But the Rotate and Translate functions I need are not working.
I haven't tested other functions in the class, but I think it won't work.

Check the function operation of the class.

The example code is shown below.

NPoint p1 = new NPointD (10.0,10.0);

// p1 X, Y does not change
p1.Rotate(30.0);

// p1 X, Y does not change
p1.Translate (3.0,3.0);

please answer about my question.



Similar Topics


Reading This Topic