blubber-server-0.0.1: The blubber server, serves blubber clients.

Copyright(c) plaimi 2015
LicenseAGPL-3
Maintainerblubber@plaimi.net
Safe HaskellNone
LanguageHaskell2010

Blubber.Server.Vector

Description

 

Synopsis

Documentation

data Vector Source

Constructors

Vec 

Fields

vx :: Double

The x position.

vy :: Double

The y position.

Instances

Eq Vector 
Show Vector 
Generic Vector 
Serialize Vector

Vector uses a Serialize instance to encode its data.

type Rep Vector 

(^-^) :: Vector -> Vector -> Vector infixl 6 Source

Vector subtraction.

(^+^) :: Vector -> Vector -> Vector infixl 6 Source

Vector addition.

(^*^) :: Vector -> Double -> Vector infixl 7 Source

Multiply a Vector with a scalar.

(^/^) :: Vector -> Double -> Vector infixl 7 Source

Divide a Vector by a scalar.

magVec :: Vector -> Double Source

Calculate the magnitude of a Vector.

vecLimitMag :: Double -> Vector -> Vector Source

Limit the magnitude of a Vector to a scalar.