Disabling Nuvoton NCT6791D because of fan full speed bug on Asus Z97 WS.
1 // --------------------------------------------------------------------------------------------------------------------
2 // <copyright file="ScreenVector.cs" company="OxyPlot">
3 // The MIT License (MIT)
5 // Copyright (c) 2012 Oystein Bjorke
7 // Permission is hereby granted, free of charge, to any person obtaining a
8 // copy of this software and associated documentation files (the
9 // "Software"), to deal in the Software without restriction, including
10 // without limitation the rights to use, copy, modify, merge, publish,
11 // distribute, sublicense, and/or sell copies of the Software, and to
12 // permit persons to whom the Software is furnished to do so, subject to
13 // the following conditions:
15 // The above copyright notice and this permission notice shall be included
16 // in all copies or substantial portions of the Software.
18 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
19 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
21 // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
22 // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
23 // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
24 // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 // Represents a vector defined in the screen coordinate system.
29 // --------------------------------------------------------------------------------------------------------------------
35 /// Represents a vector defined in the screen coordinate system.
37 public struct ScreenVector
50 /// Initializes a new instance of the <see cref="ScreenVector"/> structure.
58 public ScreenVector(double x, double y)
71 return Math.Sqrt((this.x * this.x) + (this.y * this.y));
76 /// Gets the length squared.
78 public double LengthSquared
82 return (this.x * this.x) + (this.y * this.y);
87 /// Gets or sets the x-coordinate.
89 /// <value> The x-coordinate. </value>
104 /// Gets or sets the y-coordinate.
106 /// <value> The y-coordinate. </value>
121 /// Normalizes this vector.
123 public void Normalize()
125 double l = Math.Sqrt((this.x * this.x) + (this.y * this.y));
134 /// Returns a <see cref="System.String"/> that represents this instance.
137 /// A <see cref="System.String"/> that represents this instance.
139 public override string ToString()
141 return this.x + " " + this.y;
145 /// Implements the operator *.
147 /// <param name="v"> The vector. </param>
148 /// <param name="d"> The multiplication factor. </param>
149 /// <returns> The result of the operator. </returns>
150 public static ScreenVector operator *(ScreenVector v, double d)
152 return new ScreenVector(v.x * d, v.y * d);