Home

Awesome

Libsass Math Plugin

Native libsass plugin adding trigonometric and mathematical functions.

Building

You need to have libsass already compiled or installed as a shared library (inclusive header files). It is then compiled via cmake. See this example to compile it on windows via MinGW Compiler Suite:

git clone https://github.com/sass/libsass.git
mingw32-make -C libsass BUILD=shared CC=gcc -j5
git clone https://github.com/mgreter/libsass-math.git
cd libsass-math && mkdir build && cd build
cmake -G "MinGW Makefiles" .. -DLIBSASS_DIR="..\..\libsass"
mingw32-make CC=gcc -j5 && dir math.dll

You may define LIBSASS_INCLUDE_DIR and LIBSASS_LIBRARY_DIR separately!

API

The following globals are available when you import the math plugin.

The following functions are available when you import the math plugin.

math/numeric

math/exponentiation

math/trigonometry

math/hyperbolic

math/inverse-trigonometry

math/inverse-hyperbolic

Copyright

© 2015 Marcel Greter