Пример #1
0
		/// <summary>
		/// Versore normale (ruotato +90 gradi)
		/// </summary>
		/// <returns>Il vettore perpendicolare, normalizzato a modulo unitario</returns>
		public Point2D Normal() 
			{
			Point2D n = new Point2D(- this.y, this.x);
			n.Normalize();
			return n;
			}
Пример #2
0
		/// <summary>
		/// Versore (modulo unitario) parallelo
		/// </summary>
		/// <returns>Il versore o [0,0] se errore</returns>
		public Point2D Versor() 
			{
			Point2D n = new Point2D(this.x, this.y);
			if(n.Normalize())
				return n;
			else
				return new Point2D();				
			}