diff options
Diffstat (limited to 'libstorycode/stylesheet.c')
-rw-r--r-- | libstorycode/stylesheet.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libstorycode/stylesheet.c b/libstorycode/stylesheet.c index d649d48..8fa904e 100644 --- a/libstorycode/stylesheet.c +++ b/libstorycode/stylesheet.c @@ -588,3 +588,13 @@ int stylesheet_set_from_storycode(Stylesheet *ss, const char *sc) return 0; } + + +double lcalc(struct length l, double pd) +{ + if ( l.unit == LENGTH_UNIT ) { + return l.len; + } else { + return l.len * pd; + } +} |