math utlity functions for softimage