summaryrefslogtreecommitdiff
path: root/src/sims/util/Polar.scala
blob: 931be087bf3b85c3817438188e1dc8a39fb2f48c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/*
 * Simple Mechanics Simulator (SiMS)
 * copyright (c) 2009 Jakob Odersky
 * made available under the MIT License
*/

package sims.util

import sims.geometry._
import scala.Math._

/**Polare Koordinaten.*/
case class Polar(distance: Double, angle: Double) {
  
  /**Ergibt die Vektorrepraesantation dieser polaren Koordinaten.*/
  def toCarthesian = Vector2D(distance * sin(angle), distance * cos(angle))
}