Module: Stick
- Defined in:
- lib/stick/quaternion.rb,
lib/stick/units.rb,
lib/stick/matrix.rb,
lib/stick/currency.rb,
lib/stick/matrix/lu.rb,
lib/stick/units/base.rb,
lib/stick/matrix/core.rb,
lib/stick/units/units.rb,
lib/stick/constants/cgs.rb,
lib/stick/constants/mks.rb,
lib/stick/matrix/givens.rb,
lib/stick/matrix/jacobi.rb,
lib/stick/units/loaders.rb,
lib/stick/units/currency.rb,
lib/stick/constants/number.rb,
lib/stick/matrix/exception.rb,
lib/stick/matrix/hessenberg.rb,
lib/stick/matrix/householder.rb,
lib/stick/constants/typeless_cgs.rb,
lib/stick/constants/typeless_mks.rb
Overview
Title:
Unitless MKS Constants
Copyright:
Copyright (C) 2003 Daniel Carrera, Brian Gough
MIT License
Authors:
- Thomas Sawyer
- Daniel Carrera
- Brian Gough
Defined Under Namespace
Modules: Constants, ExceptionForMatrix, Units Classes: Matrix, Quaternion, Vector
Class Method Summary collapse
Class Method Details
.Quaternion(a = 0, b = 0, c = 0, d = 0) ⇒ Object
216 217 218 219 220 221 222 223 224 225 226 |
# File 'lib/stick/quaternion.rb', line 216 def Quaternion(a=0, b=0,c=0, d=0) if a.kind_of?(Quaternion); a; elsif a.kind_of?(Complex) and b.kind_of?(Complex); Quaternion.new(a.real, a.image, b.real, b.image) elsif a.kind_of?(Complex); Quaternion.new(a.real, a.image) else Quaternion.new(a,b,c,d); end end |