title: How can I create a static class in Swift?
body: <p>I'm looking to create a static class called VectorCalculator. Perhaps this function should just be placed in my Vector class (similar to NSString's -<code>-stringByAppendingString</code> method in Obj-C)... and if you think that... let me know.</p>
  
  <p>Anyway I want to add a couple of static functions to a static class called VectorCalculator. It will calculate the 'dot product' and return a Vector. Another function will likely be to 'calculate and return the angle between two given vectors'.</p>
  
  <p>A) Would anyone go this route of creating a static class for this or </p>
  
  <p>B) should I just add these functions as instance functions of the Vector class such as... <code>public func dotProductWithVector(v: Vector) -&gt; Vector</code> and <code>public func angleWithVector(v: Vector) -&gt; Double</code>. And then both of these argument vectors <strong>v</strong> will be applied to the Vector classes main Vector <strong>u</strong>. </p>
  
  <p>What's the benefit of going either A or B?</p>
  
  <p>If you think B, just for future reference, how <em>would you create</em> an all static class in Swift?</p>