ae519064e4c8b79096b7894842a2325a37ceb5d5
[platform/core/csapi/tizenfx.git] / test / Tizen.NUI.Tests / Tizen.NUI.Devel.Tests / testcase / public / Common / TSRotation.cs
1 using global::System;
2 using NUnit.Framework;
3 using NUnit.Framework.TUnit;
4 using Tizen.NUI.Components;
5 using Tizen.NUI.BaseComponents;
6 using System.Collections.Generic;
7 using System.Threading.Tasks;
8
9 namespace Tizen.NUI.Devel.Tests
10 {
11     using tlog = Tizen.Log;
12
13     [TestFixture]
14     [Description("public/Common/Rotation")]
15     public class PublicRotationTest
16     {
17         private const string tag = "NUITEST";
18
19         private Vector3 MyCross(Vector3 vector1, Vector3 vector2)
20         {
21             return new Vector3((vector1.Y * vector2.Z) - (vector1.Z * vector2.Y),
22                   (vector1.Z * vector2.X) - (vector1.X * vector2.Z),
23                   (vector1.X * vector2.Y) - (vector1.Y * vector2.X));
24         }
25
26         private float MyDot(Vector3 vector1, Vector3 vector2)
27         {
28             return vector1.X * vector2.X + vector1.Y * vector2.Y + vector1.Z * vector2.Z; ;
29         }
30
31         [SetUp]
32         public void Init()
33         {
34             tlog.Info(tag, "Init() is called!");
35         }
36
37         [TearDown]
38         public void Destroy()
39         {
40             tlog.Info(tag, "Destroy() is called!");
41         }
42
43         [Test]
44         [Category("P1")]
45         [Description("Rotation Addition.")]
46         [Property("SPEC", "Tizen.NUI.Rotation.+ M")]
47         [Property("SPEC_URL", "-")]
48         [Property("CRITERIA", "MR")]
49         [Property("AUTHOR", "guowei.wang@samsung.com")]
50         public void RotationAddition()
51         {
52             tlog.Debug(tag, $"RotationAddition START");
53
54             var testingTarget = new Rotation(new Radian(new Degree(180.0f)), new Vector3(1.0f, 0.0f, 0.0f));
55             Assert.IsNotNull(testingTarget, "Can't create success object Rotation");
56             Assert.IsInstanceOf<Rotation>(testingTarget, "Should return Rotation instance.");
57
58             using (Rotation rotation = new Rotation(new Radian(new Degree(180.0f)), new Vector3(1.0f, 0.0f, 0.0f)))
59             {
60                 var result = testingTarget + rotation;
61
62                 Radian radian = new Radian(0.0f);
63                 Vector3  axis = new Vector3();
64                 result.GetAxisAngle(axis, radian);
65
66                 Assert.AreEqual(2.0f, axis.X, "Addition function does not work, Vector3.X value is not correct");
67                 Assert.AreEqual(0.0f, axis.Y, "Addition function does not work, Vector3.Y value is not correct");
68                 Assert.AreEqual(0.0f, axis.Z, "Addition function does not work, Vector3.Z value is not correct");
69             }
70
71             testingTarget.Dispose();
72             tlog.Debug(tag, $"RotationAddition END (OK)");
73         }
74
75         [Test]
76         [Category("P1")]
77         [Description("Rotation Subtraction.")]
78         [Property("SPEC", "Tizen.NUI.Rotation.- M")]
79         [Property("SPEC_URL", "-")]
80         [Property("CRITERIA", "MR")]
81         [Property("AUTHOR", "guowei.wang@samsung.com")]
82         public void RotationSubtraction()
83         {
84             tlog.Debug(tag, $"RotationSubtraction START");
85
86             var testingTarget = new Rotation(new Radian(new Degree(180.0f)), new Vector3(0.0f, 1.0f, 0.0f));
87             Assert.IsNotNull(testingTarget, "Can't create success object Rotation");
88             Assert.IsInstanceOf<Rotation>(testingTarget, "Should return Rotation instance.");
89
90             using (Rotation rotation = new Rotation(new Radian(new Degree(180.0f)), new Vector3(0.0f, 1.0f, 0.0f)))
91             {
92                 var result = testingTarget - rotation;
93
94                 Radian radian = new Radian(0.0f);
95                 Vector3 axis = new Vector3();
96                 result.GetAxisAngle(axis, radian);
97
98                 Assert.AreEqual(0.0f, axis.X, "Subtraction function does not work, Vector3.X value is not correct");
99                 Assert.AreEqual(0.0f, axis.Y, "Subtraction function does not work, Vector3.Y value is not correct");
100                 Assert.AreEqual(0.0f, axis.Z, "Subtraction function does not work, Vector3.Z value is not correct");
101             }
102
103             testingTarget.Dispose();    
104             tlog.Debug(tag, $"RotationSubtraction END (OK)");
105         }
106
107         [Test]
108         [Category("P1")]
109         [Description("Rotation UnaryNegation.")]
110         [Property("SPEC", "Tizen.NUI.Rotation.UnaryNegation M")]
111         [Property("SPEC_URL", "-")]
112         [Property("CRITERIA", "MR")]
113         [Property("AUTHOR", "guowei.wang@samsung.com")]
114         public void RotationUnaryNegation()
115         {
116             tlog.Debug(tag, $"RotationUnaryNegation START");
117
118             Rotation testingTarget = null;
119             using (Rotation rotation = new Rotation(new Radian(new Degree(180.0f)), new Vector3(0.0f, 1.0f, 0.0f)))
120             {
121                 testingTarget = -rotation;
122
123                 Radian radian = new Radian(0.0f);
124                 Vector3  axis = new Vector3();
125                 testingTarget.GetAxisAngle(axis, radian);
126
127                 Assert.AreEqual(0.0f, axis.X, "UnaryNegation function does not work, Vector3.X value is not correct");
128                 Assert.AreEqual(-1.0f, axis.Y, "UnaryNegation function does not work, Vector3.Y value is not correct");
129                 Assert.AreEqual(0.0f, axis.Z, "UnaryNegation function does not work, Vector3.Z value is not correct");
130
131             }
132
133             testingTarget.Dispose();
134             tlog.Debug(tag, $"RotationUnaryNegation END (OK)");
135         }
136
137         [Test]
138         [Category("P1")]
139         [Description("Rotation Multiply. By Rotation.")]
140         [Property("SPEC", "Tizen.NUI.Rotation.* M")]
141         [Property("SPEC_URL", "-")]
142         [Property("CRITERIA", "MR")]
143         [Property("COVPARAM", "Rotation, Rotation")]
144         [Property("AUTHOR", "guowei.wang@samsung.com")]
145         public void RotationMultiplyByRotation()
146         {
147             tlog.Debug(tag, $"RotationMultiplyByRotation START");
148
149             using (Vector3 vector = new Vector3(0.0f, 0.0f, 0.0f))
150             {
151                 Rotation rotation = new Rotation(new Radian(MyDot(vector, vector)), MyCross(vector, vector));
152
153                 Radian radian = new Radian(0.0f);
154                 Vector3  axis = new Vector3();
155                 rotation.GetAxisAngle(axis, radian);
156
157                 var testingTarget = new Rotation(new Radian(0.0f), vector);
158                 Assert.IsNotNull(testingTarget, "Can't create success object Rotation");
159                 Assert.IsInstanceOf<Rotation>(testingTarget, "Should return Rotation instance.");
160
161                 using (Rotation multiplier = new Rotation(new Radian(0.0f), vector))
162                 {
163                     var result = testingTarget * multiplier;
164
165                     Radian radian2 = new Radian(0.0f);
166                     Vector3 axis2 = new Vector3();
167                     result.GetAxisAngle(axis2, radian2);
168
169                     Assert.AreEqual(float.Parse(axis2.X.ToString("F2")), float.Parse(axis.X.ToString("F2")), "Vector3 got from Multiply is not correct, X value is not correct");
170                     Assert.AreEqual(float.Parse(axis2.Y.ToString("F2")), float.Parse(axis.Y.ToString("F2")), "Vector3 got from Multiply is not correct, Y value is not correct");
171                     Assert.AreEqual(float.Parse(axis2.Z.ToString("F2")), float.Parse(axis.Z.ToString("F2")), "Vector3 got from Multiply is not correct, Z value is not correct");
172                 }
173
174                 rotation.Dispose();
175                 testingTarget.Dispose();
176             }
177
178             tlog.Debug(tag, $"RotationMultiplyByRotation END (OK)");
179         }
180
181         [Test]
182         [Category("P1")]
183         [Description("Rotation Multiply. By Vector3.")]
184         [Property("SPEC", "Tizen.NUI.Rotation.* M")]
185         [Property("SPEC_URL", "-")]
186         [Property("CRITERIA", "MR")]
187         [Property("AUTHOR", "guowei.wang@samsung.com")]
188         public void RotationMultiplyByVector3()
189         {
190             tlog.Debug(tag, $"RotationMultiplyByVector3 START");
191
192             using (Vector3 vector = new Vector3(0.0f, 0.0f, 0.0f))
193             {
194                 using (Rotation rotation = new Rotation(new Radian(0.0f), Vector3.Zero))
195                 {
196                     Rotation rotation1 = rotation;
197                     rotation1.Invert();
198                     Rotation rotation2 = new Rotation(new Radian(0.0f), vector);
199
200                     var result = (rotation * rotation2) * rotation1;
201
202                     Radian radian = new Radian(0.0f);
203                     Vector3 axis = new Vector3();
204                     result.GetAxisAngle(axis, radian);
205
206                     var testingTarget = rotation * vector;
207                     Assert.IsNotNull(testingTarget, "Can't create success object Vector3");
208                     Assert.IsInstanceOf<Vector3>(testingTarget, "Should return Vector3 instance.");
209
210                     Assert.AreEqual(testingTarget.X, float.Parse(axis.X.ToString("F2")), "Vector3 got from Multiply is not correct, X value is not correct");
211                     Assert.AreEqual(testingTarget.Y, float.Parse(axis.Y.ToString("F2")), "Vector3 got from Multiply is not correct, Y value is not correct");
212                     Assert.AreEqual(testingTarget.Z, float.Parse(axis.Z.ToString("F2")), "Vector3 got from Multiply is not correct, Z value is not correct");
213
214                     rotation1.Dispose();
215                     rotation2.Dispose();
216                 }
217             }       
218
219             tlog.Debug(tag, $"RotationMultiplyByVector3 END (OK)");
220         }
221
222         [Test]
223         [Category("P1")]
224         [Description("Rotation Multiply. By Float.")]
225         [Property("SPEC", "Tizen.NUI.Rotation.* M")]
226         [Property("SPEC_URL", "-")]
227         [Property("CRITERIA", "MR")]
228         [Property("AUTHOR", "guowei.wang@samsung.com")]
229         public void RotationMultiplyByFloat()
230         {
231             tlog.Debug(tag, $"RotationMultiplyByFloat START");
232
233             var testingTarget = new Rotation(new Radian(new Degree(180)), new Vector3(1.0f, 0.0f, 0.0f));
234             Assert.IsNotNull(testingTarget, "Can't create success object Rotation");
235             Assert.IsInstanceOf<Rotation>(testingTarget, "Should return Rotation instance.");
236
237             var result = testingTarget * 2.0f;
238             
239             Radian radian = new Radian(0.0f);
240             Vector3  axis = new Vector3();
241             result.GetAxisAngle(axis, radian);
242             
243             Assert.AreEqual(2.0f, float.Parse(axis.X.ToString("F2")), "Vector3 got from Multiply is not correct, X value is not correct");
244             Assert.AreEqual(0.0f, float.Parse(axis.Y.ToString("F2")), "Vector3 got from Multiply is not correct, Y value is not correct");
245             Assert.AreEqual(0.0f, float.Parse(axis.Z.ToString("F2")), "Vector3 got from Multiply is not correct, Z value is not correct");
246
247             testingTarget.Dispose();
248             tlog.Debug(tag, $"RotationMultiplyByFloat END (OK)");
249         }
250
251         [Test]
252         [Category("P1")]
253         [Description("Rotation Division. By Rotation.")]
254         [Property("SPEC", "Tizen.NUI.Rotation./ M")]
255         [Property("SPEC_URL", "-")]
256         [Property("CRITERIA", "MR")]
257         [Property("AUTHOR", "guowei.wang@samsung.com")]
258         public void RotationDivisionByRotation()
259         {
260             tlog.Debug(tag, $"RotationDivisionByRotation START");
261
262             var testingTarget = new Rotation(new Radian(2.35551f), new Vector3(0.0f, 0.0f, 1.00027f));
263             Assert.IsNotNull(testingTarget, "Can't create success object Rotation");
264             Assert.IsInstanceOf<Rotation>(testingTarget, "Should return Rotation instance.");
265
266             using (Rotation rotation = new Rotation(new Radian(3.14159f), new Vector3(0.609f, 0.0f, 0.793f)))
267             {
268                 var result = testingTarget / rotation;
269
270                 Radian radian = new Radian(0.0f);
271                 Vector3 axis = new Vector3();
272                 result.GetAxisAngle(axis, radian);
273
274                 Assert.AreEqual(-0.34f, float.Parse(axis.X.ToString("F2")), "Should be equal!");
275                 Assert.AreEqual(-0.83f, float.Parse(axis.Y.ToString("F2")), "Should be equal!");
276                 Assert.AreEqual(-0.45f, float.Parse(axis.Z.ToString("F2")), "Should be equal!");
277             }
278
279             testingTarget.Dispose();
280             tlog.Debug(tag, $"RotationDivisionByRotation END (OK)");
281         }
282
283         [Test]
284         [Category("P1")]
285         [Description("Rotation Division.")]
286         [Property("SPEC", "Tizen.NUI.Rotation./ M")]
287         [Property("SPEC_URL", "-")]
288         [Property("CRITERIA", "MR")]
289         [Property("AUTHOR", "guowei.wang@samsung.com")]
290         public void RotationDivisionByFloat()
291         {
292             tlog.Debug(tag, $"RotationDivisionByFloat START");
293
294             var testingTarget = new Rotation(new Radian(new Degree(180.0f)), new Vector3(0.0f, 1.0f, 0.0f));
295             Assert.IsNotNull(testingTarget, "Can't create success object Rotation");
296             Assert.IsInstanceOf<Rotation>(testingTarget, "Should return Rotation instance.");
297
298             var result = testingTarget / 2.0f;
299             Radian radian = new Radian(0.0f);
300             Vector3  axis = new Vector3();
301
302             result.GetAxisAngle(axis, radian);
303             Assert.AreEqual(0.0f, axis.X, "Division function does not work, Vector3.X value is not correct");
304             Assert.AreEqual(0.5f, axis.Y, "Division function does not work, Vector3.Y value is not correct");
305             Assert.AreEqual(0.0f, axis.Z, "Division function does not work, Vector3.Z value is not correct");
306
307             testingTarget.Dispose();
308             tlog.Debug(tag, $"RotationDivisionByFloat END (OK)");
309         }
310
311         [Test]
312         [Category("P1")]
313         [Description("Rotation constructor.")]
314         [Property("SPEC", "Tizen.NUI.Rotation.Rotation C")]
315         [Property("SPEC_URL", "-")]
316         [Property("CRITERIA", "CONSTR")]
317         [Property("AUTHOR", "guowei.wang@samsung.com")]
318         public void RotationConstructor()
319         {
320             tlog.Debug(tag, $"RotationConstructor START");
321
322             var testingTarget = new Rotation();
323             Assert.IsNotNull(testingTarget, "Can't create success object Rotation");
324             Assert.IsInstanceOf<Rotation>(testingTarget, "Should return Rotation instance.");
325
326             testingTarget.Dispose();
327             tlog.Debug(tag, $"RotationConstructor END (OK)");
328         }
329
330         [Test]
331         [Category("P1")]
332         [Description("Rotation constructor. With Radian and Vector3.")]
333         [Property("SPEC", "Tizen.NUI.Rotation.Rotation C")]
334         [Property("SPEC_URL", "-")]
335         [Property("CRITERIA", "CONSTR")]
336         [Property("AUTHOR", "guowei.wang@samsung.com")]
337         public void RotationConstructorWithRadianAndVector3()
338         {
339             tlog.Debug(tag, $"RotationConstructorWithRadianAndVector3 START");
340
341             var testingTarget = new Rotation(new Radian(6.0f), new Vector3(1.0f, 2.0f, 3.0f));
342             Assert.IsNotNull(testingTarget, "Can't create success object Rotation");
343             Assert.IsInstanceOf<Rotation>(testingTarget, "Should return Rotation instance.");
344
345             Radian radian = new Radian(0.0f);
346             Vector3  axis = new Vector3();
347             testingTarget.GetAxisAngle(axis, radian);
348
349             Assert.AreEqual(0.27f, float.Parse(axis.X.ToString("F2")), "Vector3 parameter got from constructor is not correct, X value is not correct");
350             Assert.AreEqual(0.53f, float.Parse(axis.Y.ToString("F2")), "Vector3 parameter got from constructor is not correct, Y value is not correct");
351             Assert.AreEqual(0.80f, float.Parse(axis.Z.ToString("F2")), "Vector3 parameter got from constructor is not correct, Z value is not correct");
352
353             testingTarget.Dispose();
354             tlog.Debug(tag, $"RotationConstructorWithRadianAndVector3 END (OK)");
355         }
356
357         [Test]
358         [Category("P1")]
359         [Description("Rotation IDENTITY.")]
360         [Property("SPEC", "Tizen.NUI.Rotation.IDENTITY A")]
361         [Property("SPEC_URL", "-")]
362         [Property("CRITERIA", "PRO")]
363         [Property("AUTHOR", "guowei.wang@samsung.com")]
364         public void RotationIDENTITY()
365         {
366             tlog.Debug(tag, $"RotationIDENTITY START");
367
368             Rotation rotation = new Rotation(new Radian(0.0f), new Vector3(1.0f, 1.0f, 1.0f));
369             Radian radian = new Radian(0.0f);
370             Vector3  axis = new Vector3();
371             rotation.GetAxisAngle(axis, radian);
372             
373             var testingTarget = Rotation.IDENTITY;
374             Assert.IsNotNull(testingTarget, "Can't create success object Rotation");
375             Assert.IsInstanceOf<Rotation>(testingTarget, "Should return Rotation instance.");
376
377             Radian radian2 = new Radian(0.0f);
378             Vector3  axis2 = new Vector3();
379             testingTarget.GetAxisAngle(axis2, radian2);
380
381             Assert.AreEqual(float.Parse(axis2.X.ToString("F2")), float.Parse(axis.X.ToString("F2")), "Vector3 got from IDENTITY is not correct, X value is not correct");
382             Assert.AreEqual(float.Parse(axis2.X.ToString("F2")), float.Parse(axis.Y.ToString("F2")), "Vector3 got from IDENTITY is not correct, Y value is not correct");
383             Assert.AreEqual(float.Parse(axis2.X.ToString("F2")), float.Parse(axis.Z.ToString("F2")), "Vector3 got from IDENTITY is not correct, Z value is not correct");
384
385             rotation.Dispose();
386             testingTarget.Dispose();
387             tlog.Debug(tag, $"RotationIDENTITY END (OK)");
388         }
389
390         [Test]
391         [Category("P1")]
392         [Description("Rotation IsIdentity.")]
393         [Property("SPEC", "Tizen.NUI.Rotation.IsIdentity M")]
394         [Property("SPEC_URL", "-")]
395         [Property("CRITERIA", "MR")]
396         [Property("AUTHOR", "guowei.wang@samsung.com")]
397         public void RotationIsIdentity()
398         {
399             tlog.Debug(tag, $"RotationIsIdentity START");
400
401             using (Rotation testingTarget = Rotation.IDENTITY)
402             {
403                 Assert.IsTrue(testingTarget.IsIdentity(), "IsIdentity should return true!");
404             }
405
406             using (Rotation testingTarget = new Rotation(new Radian(90.0f), new Vector3(0.1f, 0.0f, 0.0f)))
407             {
408                 Assert.IsFalse(testingTarget.IsIdentity(), "IsIdentity should return false!");
409             }
410
411             tlog.Debug(tag, $"RotationIsIdentity END (OK)");
412         }
413
414         [Test]
415         [Category("P1")]
416         [Description("Rotation GetAxisAngle.")]
417         [Property("SPEC", "Tizen.NUI.Rotation.GetAxisAngle M")]
418         [Property("SPEC_URL", "-")]
419         [Property("CRITERIA", "MR")]
420         [Property("AUTHOR", "guowei.wang@samsung.com")]
421         public void RotationGetAxisAngle()
422         {
423             tlog.Debug(tag, $"RotationGetAxisAngle START");
424
425             var testingTarget = new Rotation(new Radian(6.0f), new Vector3(1.0f, 2.0f, 3.0f));
426             Assert.IsNotNull(testingTarget, "Can't create success object Rotation");
427             Assert.IsInstanceOf<Rotation>(testingTarget, "Should return Rotation instance.");
428
429             Radian radian = new Radian(0.0f);
430             Vector3  axis = new Vector3();
431             testingTarget.GetAxisAngle(axis, radian);
432
433             Assert.AreEqual(0.27f, float.Parse(axis.X.ToString("F2")), "Vector3 got from GetAxisAngle is not correct, X value is not correct");
434             Assert.AreEqual(0.53f, float.Parse(axis.Y.ToString("F2")), "Vector3 got from GetAxisAngle is not correct, Y value is not correct");
435             Assert.AreEqual(0.80f, float.Parse(axis.Z.ToString("F2")), "Vector3 got from GetAxisAngle is not correct, Z value is not correct");
436
437             testingTarget.Dispose();
438             tlog.Debug(tag, $"RotationGetAxisAngle END (OK)");
439         }
440
441         [Test]
442         [Category("P1")]
443         [Description("Rotation Length.")]
444         [Property("SPEC", "Tizen.NUI.Rotation.Length M")]
445         [Property("SPEC_URL", "-")]
446         [Property("CRITERIA", "MR")]
447         [Property("AUTHOR", "guowei.wang@samsung.com")]
448         public void RotationLength()
449         {
450             tlog.Debug(tag, $"RotationLength START");
451
452             var testingTarget = new Rotation(new Radian(new Degree(90)), new Vector3(1.0f, 2.0f, 3.0f));
453             Assert.IsNotNull(testingTarget, "Can't create success object Rotation");
454             Assert.IsInstanceOf<Rotation>(testingTarget, "Should return Rotation instance.");
455
456             double a = Math.Sqrt(0.707f * 0.707f + 0.189f * 0.189f + 0.378f * 0.378f + 0.567f * 0.567f);
457             
458             var result = testingTarget.Length();
459             Assert.AreEqual(float.Parse(a.ToString("F2")), float.Parse(result.ToString("F2")), "Length function return incorrect value");
460
461             testingTarget.Dispose();
462             tlog.Debug(tag, $"RotationLength END (OK)");
463         }
464
465         [Test]
466         [Category("P1")]
467         [Description("Rotation LengthSquared.")]
468         [Property("SPEC", "Tizen.NUI.Rotation.LengthSquared M")]
469         [Property("SPEC_URL", "-")]
470         [Property("CRITERIA", "MR")]
471         [Property("AUTHOR", "guowei.wang@samsung.com")]
472         public void RotationLengthSquared()
473         {
474             tlog.Debug(tag, $"RotationLengthSquared START");
475
476             var testingTarget = new Rotation(new Radian(new Degree(90)), new Vector3(1.0f, 2.0f, 3.0f));
477             Assert.IsNotNull(testingTarget, "Can't create success object Rotation");
478             Assert.IsInstanceOf<Rotation>(testingTarget, "Should return Rotation instance.");
479
480             double a = 0.707f * 0.707f + 0.189f * 0.189f + 0.378f * 0.378f + 0.567f * 0.567f;
481             
482             var result = testingTarget.LengthSquared();
483             Assert.AreEqual(float.Parse(a.ToString("F2")), float.Parse(result.ToString("F2")), "LengthSquared function return incorrect value");
484
485             testingTarget.Dispose();
486             tlog.Debug(tag, $"RotationLengthSquared END (OK)");
487         }
488
489         [Test]
490         [Category("P1")]
491         [Description("Rotation Normalize.")]
492         [Property("SPEC", "Tizen.NUI.Rotation.Normalize M")]
493         [Property("SPEC_URL", "-")]
494         [Property("CRITERIA", "MR")]
495         [Property("AUTHOR", "guowei.wang@samsung.com")]
496         public void RotationNormalize()
497         {
498             tlog.Debug(tag, $"RotationNormalize START");
499
500             var testingTarget = new Rotation(new Radian(6.0f), new Vector3(1.0f, 2.0f, 3.0f));
501             Assert.IsNotNull(testingTarget, "Can't create success object Rotation");
502             Assert.IsInstanceOf<Rotation>(testingTarget, "Should return Rotation instance.");
503
504             testingTarget.Normalize();
505
506             Radian radian = new Radian(0.0f);
507             Vector3  axis = new Vector3();
508             testingTarget.GetAxisAngle(axis, radian);
509
510             Assert.AreEqual(0.27f, float.Parse(axis.X.ToString("F2")), "Vector3 got from Normalize is not correct, X value is not correct");
511             Assert.AreEqual(0.53f, float.Parse(axis.Y.ToString("F2")), "Vector3 got from Normalize is not correct, Y value is not correct");
512             Assert.AreEqual(0.80f, float.Parse(axis.Z.ToString("F2")), "Vector3 got from Normalize is not correct, Z value is not correct");
513
514             testingTarget.Dispose();
515             tlog.Debug(tag, $"RotationNormalize END (OK)");
516         }
517
518         [Test]
519         [Category("P1")]
520         [Description("Rotation Normalized.")]
521         [Property("SPEC", "Tizen.NUI.Rotation.Normalized M")]
522         [Property("SPEC_URL", "-")]
523         [Property("CRITERIA", "MR")]
524         [Property("AUTHOR", "guowei.wang@samsung.com")]
525         public void RotationNormalized()
526         {
527             tlog.Debug(tag, $"RotationNormalized START");
528
529             Rotation rotation = new Rotation(new Radian(6.0f), new Vector3(1.0f, 2.0f, 3.0f));
530             
531             Radian radian = new Radian(0.0f);
532             Vector3  axis = new Vector3();
533             rotation.GetAxisAngle(axis, radian);
534             
535             Assert.AreEqual(0.27f, float.Parse(axis.X.ToString("F2")), "X value is not correct");
536             Assert.AreEqual(0.53f, float.Parse(axis.Y.ToString("F2")), "Y value is not correct");
537             Assert.AreEqual(0.80f, float.Parse(axis.Z.ToString("F2")), "Z value is not correct");
538             
539             var testingTarget = rotation * 5.0f;
540             Assert.IsNotNull(testingTarget, "Can't create success object Rotation");
541             Assert.IsInstanceOf<Rotation>(testingTarget, "Should return Rotation instance.");
542
543             var result = testingTarget.Normalized();
544             Radian radian2 = new Radian(0.0f);
545             Vector3  axis2 = new Vector3();
546             result.GetAxisAngle(axis2, radian2);
547
548             Assert.AreEqual(0.27f, float.Parse(axis2.X.ToString("F2")), "X value got from Normalized is not correct");
549             Assert.AreEqual(0.53f, float.Parse(axis2.Y.ToString("F2")), "Y value got from Normalized is not correct");
550             Assert.AreEqual(0.80f, float.Parse(axis2.Z.ToString("F2")), "Z value got from Normalized is not correct");
551
552             rotation.Dispose();
553             testingTarget.Dispose();
554             tlog.Debug(tag, $"RotationNormalized END (OK)");
555         }
556
557         [Test]
558         [Category("P1")]
559         [Description("Rotation Conjugate.")]
560         [Property("SPEC", "Tizen.NUI.Rotation.Conjugate M")]
561         [Property("SPEC_URL", "-")]
562         [Property("CRITERIA", "MR")]
563         [Property("AUTHOR", "guowei.wang@samsung.com")]
564         public void RotationConjugate()
565         {
566             tlog.Debug(tag, $"RotationConjugate START");
567
568             var testingTarget = new Rotation(new Radian(6.0f), new Vector3(1.0f, 2.0f, 3.0f));
569             Assert.IsNotNull(testingTarget, "Can't create success object Rotation");
570             Assert.IsInstanceOf<Rotation>(testingTarget, "Should return Rotation instance.");
571
572             Radian radian = new Radian(0.0f);
573             Vector3  axis = new Vector3();
574             testingTarget.GetAxisAngle(axis, radian);
575
576             Assert.AreEqual(0.27f, float.Parse(axis.X.ToString("F2")), "X value is not correct");
577             Assert.AreEqual(0.53f, float.Parse(axis.Y.ToString("F2")), "Y value is not correct");
578             Assert.AreEqual(0.80f, float.Parse(axis.Z.ToString("F2")), "Z value is not correct");
579             
580             testingTarget.Conjugate();
581             
582             Radian radian2 = new Radian(0.0f);
583             Vector3  axis2 = new Vector3();
584             testingTarget.GetAxisAngle(axis2, radian2);
585
586             Assert.AreEqual(-0.27f, float.Parse(axis2.X.ToString("F2")), "X value got from Conjugate is not correct");
587             Assert.AreEqual(-0.53f, float.Parse(axis2.Y.ToString("F2")), "Y value got from Conjugate is not correct");
588             Assert.AreEqual(-0.80f, float.Parse(axis2.Z.ToString("F2")), "Z value got from Conjugate is not correct");
589
590             testingTarget.Dispose();
591             tlog.Debug(tag, $"RotationConjugate END (OK)");
592         }
593
594         [Test]
595         [Category("P1")]
596         [Description("Rotation Invert.")]
597         [Property("SPEC", "Tizen.NUI.Rotation.Invert M")]
598         [Property("SPEC_URL", "-")]
599         [Property("CRITERIA", "MR")]
600         [Property("AUTHOR", "guowei.wang@samsung.com")]
601         public void RotationInvert()
602         {
603             tlog.Debug(tag, $"RotationInvert START");
604
605             var testingTarget = new Rotation(new Radian(0.0f), new Vector3(0.0f, 0.0f, 0.0f)); //radian: 2.355f z: -1.0f
606             Assert.IsNotNull(testingTarget, "Can't create success object Rotation");
607             Assert.IsInstanceOf<Rotation>(testingTarget, "Should return Rotation instance.");
608
609             Rotation testingTargetConjugate = testingTarget;
610
611             testingTargetConjugate.Conjugate();
612             testingTargetConjugate *= 1.0f / testingTarget.LengthSquared();
613
614             Radian radian = new Radian(0.0f);
615             Vector3  axis = new Vector3();
616             testingTargetConjugate.GetAxisAngle(axis, radian);
617
618             Rotation testingTargetInvert = testingTarget;
619             testingTargetInvert.Invert();
620
621             Radian radian2 = new Radian(0.0f);
622             Vector3  axis2 = new Vector3();
623             testingTargetInvert.GetAxisAngle(axis2, radian2);
624
625             Assert.AreEqual(float.Parse(axis2.X.ToString("F2")), float.Parse(axis.X.ToString("F2")), "Invert function does not work, X value is not correct");
626             Assert.AreEqual(float.Parse(axis2.Y.ToString("F2")), float.Parse(axis.Y.ToString("F2")), "Invert function does not work, Y value is not correct");
627             Assert.AreEqual(float.Parse(axis2.Z.ToString("F2")), float.Parse(axis.Z.ToString("F2")), "Invert function does not work, Z value is not correct");
628
629             testingTarget.Dispose();
630             tlog.Debug(tag, $"RotationInvert END (OK)");
631         }
632
633         [Test]
634         [Category("P1")]
635         [Description("Rotation Log.")]
636         [Property("SPEC", "Tizen.NUI.Rotation.Log M")]
637         [Property("SPEC_URL", "-")]
638         [Property("CRITERIA", "MR")]
639         [Property("AUTHOR", "guowei.wang@samsung.com")]
640         public void RotationLog()
641         {
642             tlog.Debug(tag, $"RotationLog START");
643
644             using (Rotation rotation = new Rotation(new Radian(2.29f), new Vector3(0.0f, 0.0f, 0.0f)))
645             {
646                 Rotation normalize = rotation;
647                 normalize.Normalize();
648                 Radian radian = new Radian(0.0f);
649                 Vector3 axis = new Vector3();
650                 normalize.GetAxisAngle(axis, radian);
651
652                 using (Rotation testingTarget = normalize.Log())
653                 {
654                     using (Rotation exp = testingTarget.Exp())
655                     {
656                         Radian radian2 = new Radian(0.0f);
657                         Vector3 axis2 = new Vector3();
658                         exp.GetAxisAngle(axis2, radian2);
659
660                         Assert.AreEqual(float.Parse(axis.X.ToString("F2")), float.Parse(axis2.X.ToString("F2")), "Log function does not wrok, X value is not correct");
661                         Assert.AreEqual(float.Parse(axis.Y.ToString("F2")), float.Parse(axis2.Y.ToString("F2")), "Log function does not wrok, Y value is not correct");
662                         Assert.AreEqual(float.Parse(axis.Z.ToString("F2")), float.Parse(axis2.Z.ToString("F2")), "Log function does not wrok, Z value is not correct");
663                     }
664                 }
665             }
666
667             tlog.Debug(tag, $"RotationLog END (OK)");
668         }
669
670         [Test]
671         [Category("P1")]
672         [Description("Rotation Exp.")]
673         [Property("SPEC", "Tizen.NUI.Rotation.Exp M")]
674         [Property("SPEC_URL", "-")]
675         [Property("CRITERIA", "MR")]
676         [Property("AUTHOR", "guowei.wang@samsung.com")]
677         public void RotationExp()
678         {
679             tlog.Debug(tag, $"Rotation START");
680
681             using (Rotation rotation = new Rotation(new Radian(2.29f), new Vector3(0.0f, 0.0f, 0.0f)))
682             {
683                 Rotation normalize = rotation;
684                 normalize.Normalize();
685                 Radian radian = new Radian(0.0f);
686                 Vector3 axis = new Vector3();
687                 normalize.GetAxisAngle(axis, radian);
688
689                 using (Rotation log = normalize.Log())
690                 {
691                     using (Rotation testingTarget = log.Exp())
692                     {
693                         Radian radian2 = new Radian(0.0f);
694                         Vector3 axis2 = new Vector3();
695                         testingTarget.GetAxisAngle(axis2, radian2);
696
697                         Assert.AreEqual(float.Parse(axis.X.ToString("F2")), float.Parse(axis2.X.ToString("F2")), "Log function does not wrok, X value is not correct");
698                         Assert.AreEqual(float.Parse(axis.Y.ToString("F2")), float.Parse(axis2.Y.ToString("F2")), "Log function does not wrok, Y value is not correct");
699                         Assert.AreEqual(float.Parse(axis.Z.ToString("F2")), float.Parse(axis2.Z.ToString("F2")), "Log function does not wrok, Z value is not correct");
700                     }
701                 }
702             }
703
704             tlog.Debug(tag, $"Rotation END (OK)");
705         }
706
707         [Test]
708         [Category("P1")]
709         [Description("Rotation Dot.")]
710         [Property("SPEC", "Tizen.NUI.Rotation.Dot M")]
711         [Property("SPEC_URL", "-")]
712         [Property("CRITERIA", "MR")]
713         [Property("AUTHOR", "guowei.wang@samsung.com")]
714         public void RotationDot()
715         {
716             tlog.Debug(tag, $"RotationDot START");
717
718             Rotation rotation1 = new Rotation(new Radian(1.339f), new Vector3(0.072f, 0.713f, 0.695f));
719             Rotation rotation2 = new Rotation(new Radian(1.599f), new Vector3(0.853f, 0.479f, -0.200f));
720
721             float val = 0.784f * 0.697f + MyDot(new Vector3(0.045f, 0.443f, 0.432f), new Vector3(0.612f, 0.344f, -0.144f));
722             
723             var result = Rotation.Dot(rotation1, rotation2);
724
725             Assert.AreEqual(float.Parse(result.ToString("F2")), float.Parse(val.ToString("F2")), "Dot function does not wrok");
726
727             rotation1.Dispose();
728             rotation2.Dispose();
729             tlog.Debug(tag, $"RotationDot END (OK)");
730         }
731
732         [Test]
733         [Category("P1")]
734         [Description("Rotation Lerp.")]
735         [Property("SPEC", "Tizen.NUI.Rotation.Lerp M")]
736         [Property("SPEC_URL", "-")]
737         [Property("CRITERIA", "MR")]
738         [Property("AUTHOR", "guowei.wang@samsung.com")]
739         public void RotationLerp()
740         {
741             tlog.Debug(tag, $"RotationLerp START");
742
743             Rotation rotation1 = new Rotation(new Radian(new Degree(-80.0f)), new Vector3(0.0f, 0.0f, 1.0f));
744             Rotation rotation2 = new Rotation(new Radian(new Degree(80.0f)), new Vector3(0.0f, 0.0f, 1.0f));
745             
746             Radian radian = new Radian(0.0f);
747             Vector3  axis = new Vector3();
748             rotation2.GetAxisAngle(axis, radian);
749
750             var testingTarget  = Rotation.Lerp(rotation1, rotation2, 1.0f);
751             Assert.IsNotNull(testingTarget, "Can't create success object Rotation");
752             Assert.IsInstanceOf<Rotation>(testingTarget, "Should return Rotation instance.");
753
754             Radian radian2 = new Radian(0.0f);
755             Vector3  axis2 = new Vector3();
756             testingTarget.GetAxisAngle(axis2, radian2);
757
758             Assert.AreEqual(float.Parse(axis.X.ToString("F2")), float.Parse(axis2.X.ToString("F2")), "Lerp function does not wrok, X value is not correct");
759             Assert.AreEqual(float.Parse(axis.Y.ToString("F2")), float.Parse(axis2.Y.ToString("F2")), "Lerp function does not wrok, Y value is not correct");
760             Assert.AreEqual(float.Parse(axis.Z.ToString("F2")), float.Parse(axis2.Z.ToString("F2")), "Lerp function does not wrok, Z value is not correct");
761
762             rotation1.Dispose();
763             rotation2.Dispose();
764             testingTarget.Dispose();
765             tlog.Debug(tag, $"RotationLerp END (OK)");
766         }
767
768         [Test]
769         [Category("P1")]
770         [Description("Rotation Slerp.")]
771         [Property("SPEC", "Tizen.NUI.Rotation.Slerp M")]
772         [Property("SPEC_URL", "-")]
773         [Property("CRITERIA", "MR")]
774         [Property("AUTHOR", "guowei.wang@samsung.com")]
775         public void RotationSlerp()
776         {
777             tlog.Debug(tag, $"RotationSlerp START");
778
779             Rotation rotation1 = new Rotation(new Radian(new Degree(120.0f)), new Vector3(0.0f, 0.0f, 1.0f));
780             Rotation rotation2 = new Rotation(new Radian(new Degree(130.0f)), new Vector3(0.0f, 0.0f, 1.0f));
781             
782             Radian radia = new Radian(0.0f);
783             Vector3 axis = new Vector3();
784             rotation2.GetAxisAngle(axis, radia);
785             
786             var testingTarget = Rotation.Slerp(rotation1, rotation2, 1.0f);
787             Assert.IsNotNull(testingTarget, "Can't create success object Rotation");
788             Assert.IsInstanceOf<Rotation>(testingTarget, "Should return Rotation instance.");
789
790             Radian radia2 = new Radian(0.0f);
791             Vector3 axis2 = new Vector3();
792             testingTarget.GetAxisAngle(axis2, radia2);
793             
794             Assert.AreEqual(float.Parse(axis.X.ToString("F2")), float.Parse(axis2.X.ToString("F2")), "Slerp function does not wrok, X value is not correct");
795             Assert.AreEqual(float.Parse(axis.Y.ToString("F2")), float.Parse(axis2.Y.ToString("F2")), "Slerp function does not wrok, Y value is not correct");
796             Assert.AreEqual(float.Parse(axis.Z.ToString("F2")), float.Parse(axis2.Z.ToString("F2")), "Slerp function does not wrok, Z value is not correct");
797
798             rotation1.Dispose();
799             rotation2.Dispose();
800             testingTarget.Dispose();
801             tlog.Debug(tag, $"RotationSlerp END (OK)");
802         }
803
804         [Test]
805         [Category("P1")]
806         [Description("Rotation SlerpNoInvert.")]
807         [Property("SPEC", "Tizen.NUI.Rotation.SlerpNoInvert M")]
808         [Property("SPEC_URL", "-")]
809         [Property("CRITERIA", "MR")]
810         [Property("AUTHOR", "guowei.wang@samsung.com")]
811         public void RotationSlerpNoInvert()
812         {
813             tlog.Debug(tag, $"RotationSlerpNoInvert START");
814
815             Rotation rotation1 = new Rotation(new Radian(new Degree(120.0f)), new Vector3(0.0f, 0.0f, 1.0f));
816             Radian radian1 = new Radian(0.0f);
817             Vector3  axis1 = new Vector3();
818             rotation1.GetAxisAngle(axis1, radian1);
819             
820             Rotation rotation2 = new Rotation(new Radian(new Degree(130.0f)), new Vector3(0.0f, 0.0f, 1.0f));
821             Radian radian2 = new Radian(0.0f);
822             Vector3  axis2 = new Vector3();
823             rotation2.GetAxisAngle(axis2, radian2);
824             
825             var testingTarget = Rotation.SlerpNoInvert(rotation1, rotation2, 0.0f);
826             Radian radian3 = new Radian(0.0f);
827             Vector3  axis3 = new Vector3();
828             testingTarget.GetAxisAngle(axis3, radian3);
829             Assert.AreEqual(axis1.X, axis3.X, "SlerpNoInvert function does not wrok, X value is not correct");
830             Assert.AreEqual(axis1.Y, axis3.Y, "SlerpNoInvert function does not wrok, Y value is not correct");
831             Assert.AreEqual(axis1.Z, axis3.Z, "SlerpNoInvert function does not wrok, Z value is not correct");
832
833             testingTarget = Rotation.SlerpNoInvert(rotation1, rotation2, 1.0f);
834             testingTarget.GetAxisAngle(axis3, radian3);
835             Assert.AreEqual(axis2.X, axis3.X, "SlerpNoInvert function does not wrok, X value is not correct");
836             Assert.AreEqual(axis2.Y, axis3.Y, "SlerpNoInvert function does not wrok, Y value is not correct");
837             Assert.AreEqual(axis2.Z, axis3.Z, "SlerpNoInvert function does not wrok, Z value is not correct");
838
839             rotation1.Dispose();
840             rotation2.Dispose();
841             testingTarget.Dispose();
842             tlog.Debug(tag, $"RotationSlerpNoInvert END (OK)");
843         }
844
845         [Test]
846         [Category("P1")]
847         [Description("Rotation Squad.")]
848         [Property("SPEC", "Tizen.NUI.Rotation.Squad M")]
849         [Property("SPEC_URL", "-")]
850         [Property("CRITERIA", "MR")]
851         [Property("AUTHOR", "guowei.wang@samsung.com")]
852         public void RotationSquad()
853         {
854             tlog.Debug(tag, $"RotationSquad START");
855
856             Rotation start = new Rotation(new Radian(new Degree(45.0f)), new Vector3(0.0f, 0.0f, 1.0f));
857             Rotation   end = new Rotation(new Radian(new Degree(30.0f)), new Vector3(0.0f, 1.0f, 3.0f));
858             Rotation ctrl1 = new Rotation(new Radian(new Degree(40.0f)), new Vector3(0.0f, 1.0f, 2.0f));
859             Rotation ctrl2 = new Rotation(new Radian(new Degree(35.0f)), new Vector3(0.0f, 2.0f, 3.0f));
860             
861             var testingTarget  = Rotation.Squad(start, end, ctrl1, ctrl2, 0.0f);
862             Assert.IsNotNull(testingTarget, "Can't create success object Rotation");
863             Assert.IsInstanceOf<Rotation>(testingTarget, "Should return Rotation instance.");
864
865             Radian radian1 = new Radian(0.0f);
866             Vector3  axis1 = new Vector3();
867             start.GetAxisAngle(axis1, radian1);
868
869             Radian radian2 = new Radian(0.0f);
870             Vector3  axis2 = new Vector3();
871             end.GetAxisAngle(axis2, radian2);
872
873             Radian radian3 = new Radian(0.0f);
874             Vector3  axis3 = new Vector3();
875             testingTarget.GetAxisAngle(axis3, radian3);
876
877             Assert.AreEqual(axis3.X, axis1.X, "Squad function does not wrok, X value is not correct");
878             Assert.AreEqual(axis3.Y, axis1.Y, "Squad function does not wrok, Y value is not correct");
879             Assert.AreEqual(axis3.Z, axis1.Z, "Squad function does not wrok, Z value is not correct");
880             
881             testingTarget = Rotation.Squad(start, end, ctrl1, ctrl2, 1.0f);
882
883             testingTarget.GetAxisAngle(axis3, radian3);
884             
885             Assert.AreEqual(axis3.X, axis2.X, "Squad function does not wrok, X value is not correct");
886             Assert.AreEqual(axis3.Y, axis2.Y, "Squad function does not wrok, Y value is not correct");
887             Assert.AreEqual(axis3.Z, axis2.Z, "Squad function does not wrok, Z value is not correct");
888
889             testingTarget.Dispose();
890             tlog.Debug(tag, $"RotationSquad END (OK)");
891         }
892
893         [Test]
894         [Category("P1")]
895         [Description("Rotation AngleBetween.")]
896         [Property("SPEC", "Tizen.NUI.Rotation.AngleBetween M")]
897         [Property("SPEC_URL", "-")]
898         [Property("CRITERIA", "MR")]
899         [Property("AUTHOR", "guowei.wang@samsung.com")]
900         public void RotationAngleBetween()
901         {
902             tlog.Debug(tag, $"RotationAngleBetween START");
903
904             using (Radian radian1 = new Radian(new Degree(80.0f)))
905             {
906                 Rotation rotation1 = new Rotation(radian1, Vector3.YAxis);
907                 using (Radian radian2 = new Radian(new Degree(90.0f)))
908                 {
909                     Rotation rotation2 = new Rotation(radian2, Vector3.YAxis);
910
911                     float value1 = Rotation.AngleBetween(rotation1, rotation2);
912                     float value2 = (90.0f - 80.0f) * 3.14f / 180.0f;
913                     Assert.AreEqual(float.Parse(value1.ToString("F2")), float.Parse(value2.ToString("F2")), "AngleBetween function does not work.");
914
915                     rotation2.Dispose();
916                 }
917
918                 rotation1.Dispose();
919             }
920
921             tlog.Debug(tag, $"RotationAngleBetween END (OK)");
922         }
923
924         [Test]
925         [Category("P1")]
926         [Description("Rotation Dispose.")]
927         [Property("SPEC", "Tizen.NUI.Rotation.Dispose M")]
928         [Property("SPEC_URL", "-")]
929         [Property("CRITERIA", "MR MCST")]
930         [Property("AUTHOR", "guowei.wang@samsung.com")]
931         public void RotationDispose()
932         {
933             tlog.Debug(tag, $"RotationDispose START");
934
935             try
936             {
937                 using (Radian radian = new Radian(new Degree(80.0f)))
938                 {
939                     var testingTarget = new Rotation(radian, Vector3.YAxis);
940                     Assert.IsNotNull(testingTarget, "Can't create success object Rotation");
941                     Assert.IsInstanceOf<Rotation>(testingTarget, "Should return Rotation instance.");
942
943                     testingTarget.Dispose();
944                 }   
945             }
946             catch (Exception e)
947             {
948                 Assert.Fail("Caught Exception" + e.ToString());
949             }
950
951             tlog.Debug(tag, $"RotationDispose END (OK)");
952         }
953
954         [Test]
955         [Category("P1")]
956         [Description("Rotation Rotate.")]
957         [Property("SPEC", "Tizen.NUI.Rotate. M")]
958         [Property("SPEC_URL", "-")]
959         [Property("CRITERIA", "MR")]
960         [Property("AUTHOR", "guowei.wang@samsung.com")]
961         public void RotationRotate()
962         {
963             tlog.Debug(tag, $"RotationRotate START");
964
965             var testingTarget = new Rotation(new Radian(new Degree(180.0f)), new Vector3(1.0f, 0.0f, 0.0f));
966             Assert.IsNotNull(testingTarget, "Can't create success object Rotation");
967             Assert.IsInstanceOf<Rotation>(testingTarget, "Should return Rotation instance.");
968
969             using (Vector3 vec = new Vector3(0.0f, 1.0f, 0.0f))
970             {
971                 var result = testingTarget.Rotate(vec);
972                 Assert.IsNotNull(result, "Can't create success object Vector3");
973                 Assert.IsInstanceOf<Vector3>(result, "Should return Vector3 instance.");
974             }
975             
976             testingTarget.Dispose();
977             tlog.Debug(tag, $"RotationRotate END (OK)");
978         }
979
980         [Test]
981         [Category("P1")]
982         [Description("Rotation Rotate.")]
983         [Property("SPEC", "Tizen.NUI.Rotate. M")]
984         [Property("SPEC_URL", "-")]
985         [Property("CRITERIA", "MR")]
986         [Property("AUTHOR", "guowei.wang@samsung.com")]
987         public void RotationRotateWithVector4()
988         {
989             tlog.Debug(tag, $"RotationRotateWithVector4 START");
990
991             var testingTarget = new Rotation(new Radian(new Degree(180.0f)), new Vector3(0.0f, 1.0f, 0.0f));
992             Assert.IsNotNull(testingTarget, "Can't create success object Rotation");
993             Assert.IsInstanceOf<Rotation>(testingTarget, "Should return Rotation instance.");
994
995             using (Vector4 vec = new Vector4(1.0f, 0.0f, 0.0f, 0.0f))
996             {
997                 var result = testingTarget.Rotate(vec);
998                 Assert.IsNotNull(result, "Can't create success object Vector4");
999                 Assert.IsInstanceOf<Vector4>(result, "Should return Vector4 instance.");
1000             }
1001
1002             testingTarget.Dispose();
1003             tlog.Debug(tag, $"RotationRotateWithVector4 END (OK)");
1004         }
1005     }
1006 }