Class VNVector

All Implemented Interfaces:
NSCoding, NSObjectProtocol, NSSecureCoding, ObjCProtocol

public class VNVector
extends NSObject
implements NSSecureCoding
Since:
Available in iOS 14.0 and later.
  • Constructor Details

    • VNVector

      public VNVector()
    • VNVector

      protected VNVector​(NSObject.Handle h, long handle)
    • VNVector

      protected VNVector​(NSObject.SkipInit skipInit)
    • VNVector

      public VNVector​(double x, double y)
    • VNVector

      public VNVector​(VNPoint head, VNPoint tail)
    • VNVector

      public VNVector​(NSCoder coder)
  • Method Details

    • createUsingRTheta

      public static VNVector createUsingRTheta​(double r, double theta)
    • getZeroVector

      public static VNVector getZeroVector()
    • getX

      public double getX()
    • getY

      public double getY()
    • getR

      public double getR()
    • getTheta

      public double getTheta()
    • getLength

      public double getLength()
    • getSquaredLength

      public double getSquaredLength()
    • supportsSecureCoding

      public static boolean supportsSecureCoding()
    • init

      protected long init​(double x, double y)
    • initUsingRTheta

      protected long initUsingRTheta​(double r, double theta)
    • init

      protected long init​(VNPoint head, VNPoint tail)
    • unitVectorForVector

      public static VNVector unitVectorForVector​(VNVector vector)
    • getVectorByMultiplyingVector

      public static VNVector getVectorByMultiplyingVector​(VNVector vector, double scalar)
    • getVectorByAddingVector

      public static VNVector getVectorByAddingVector​(VNVector v1, VNVector v2)
    • getVectorBySubtractingVector

      public static VNVector getVectorBySubtractingVector​(VNVector v1, VNVector v2)
    • getDotProductOfVector

      public static double getDotProductOfVector​(VNVector v1, VNVector v2)
    • encode

      public void encode​(NSCoder coder)
      Specified by:
      encode in interface NSCoding
    • init

      protected long init​(NSCoder coder)