unitys treeeditor perlinnoise source is available,
maybe its similar to mathf (which is not published…) ?