Coder Social home page Coder Social logo

unitlib's Introduction

                               unitlib - README

+ What is unitlib?

Unitlib is a programming library written in C, that handles parsing, converting
and formatting of SI units (http://en.wikipedia.org/wiki/SI).

+ Is there any documentation?

Not yet, but you may look at the unitlib.h header where each function has a 
short description.

+ Features of unitlib
 
 * Parsing of complex unit definitions like "5 kg mm / 16 ns^2".
 * Extensible rule system to create new units (e.g. Newton: "N = kg m s^-2").
 * Support for most of the SI prefixes, like nano, kilo, etc.
 * Output in three different forms: Plain text, LaTeX inline defintion and
   LaTeX fracs.
 * Output as a composed unit, e.g. "5 kg m / s^2" can be printed as "5 N".

+ Planed features

 * Find best composed unit for unclear matches ("kg m^2 s^-2" -> "N m").

+ What programs are using unitlib?

At the moment unitlib is used by two programs:
 * slas2 for Mac OS X (http://sourceforge.net/projects/slas2/)
 * EinheitenRechner for Windows (http://github.com/borlox/EinheitenRechner/)

+ Author

At the moment unitlib is developed by Jan Kuechler. 
Email: kuchen_ <at> gmx <dot> de 
(yep, that's an underscore right after 'kuchen').

+ License

At the moment unitlib has no license, so effectivly that says "all rights 
reserved".
It's planned to release the library under an open source license at some point,
for the meantime just send me an email.



For any further questions, ideas, or anything else (except spam (-;), please 
send me an email.

unitlib's People

Stargazers

Mason Swanson avatar Shreyas Balakrishna avatar  avatar Matouš Jan Fialka avatar Jan Küchler avatar

Watchers

Jan Küchler avatar  avatar James Cloos avatar

unitlib's Issues

Format options

Rework the format options for the functions in format.c to be more flexible.

Unit prefix support

Add support for unit prefixes, like nano, kilo, etc..

Developer Note:
Change the symbol -> rule processing to the following procedure:

  1. Search the normal way, with the full symbol
  2. If no rule is found:
    2.1 Extract the first character of the symbol
    2.2 If it is no valid prefix, bail out
    2.3 Otherwise search the rule for the rest-symbol
    2.4 And apply the prefix value to the factor

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.