{"id":25690624,"url":"https://github.com/s3c4/angular-ts-math","last_synced_at":"2025-04-24T04:30:51.040Z","repository":{"id":43801750,"uuid":"110822961","full_name":"s3c4/angular-ts-math","owner":"s3c4","description":"An Angular npm repository for numbers and math.","archived":false,"fork":false,"pushed_at":"2022-08-23T16:10:36.000Z","size":22,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-25T05:30:49.403Z","etag":null,"topics":["angular","math","npm-library","npm-package","ts","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/s3c4.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-11-15T11:07:53.000Z","updated_at":"2022-08-19T11:22:59.000Z","dependencies_parsed_at":"2022-09-14T02:31:24.969Z","dependency_job_id":null,"html_url":"https://github.com/s3c4/angular-ts-math","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s3c4%2Fangular-ts-math","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s3c4%2Fangular-ts-math/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s3c4%2Fangular-ts-math/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s3c4%2Fangular-ts-math/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/s3c4","download_url":"https://codeload.github.com/s3c4/angular-ts-math/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250564638,"owners_count":21451036,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["angular","math","npm-library","npm-package","ts","typescript"],"created_at":"2025-02-24T22:50:35.112Z","updated_at":"2025-04-24T04:30:50.953Z","avatar_url":"https://github.com/s3c4.png","language":"TypeScript","readme":"# angular-ts-math\nAn angular repository for numbers and math.\n\nDependencies: \n* [typescript](https://www.npmjs.com/package/typescript)\n* [tslint](https://www.npmjs.com/package/tslint)\n\n# Content\n\n* [Install](#install)\n* [Import](#import)\n* [Use](#use)\n    * [Constants](#constants)\n    * [Random](#random)\n    * [Utils](#utils)\n    * [Convert](#convert)\n    * [Number actions](#number-actions)\n    * [Operations](#operations)\n    * [Math](#math)\n* [Repository](#repository)\n* [License](#license)\n* [Changelog](#changelog)\n    * [v1.0.7](#v107)\n    * [v1.0.6](#v106)\n    * [v1.0.5](#v105)\n\n# Install\n```bash\nnpm install angular-ts-math\n```\n\n# Import\n```typescript\nimport { angularMath } from 'angular-ts-math/dist/angular-ts-math/angular-ts-math';\n```\n\n# Use\n\n##### Constants\n\n* get the pi value `angularMath.getPi();`\n* get the e value `angularMath.getE();`\n* get the ln2 value `angularMath.getLn2();`\n* get the ln10 value `angularMath.getLn10();`\n* get the log2 of e value `angularMath.getLog2E();`\n* get the log10 of e value `angularMath.getLog10E();`\n* get the min safe `angularMath.getMinSafeInteger();`\n* get the max sage `angularMath.getMaxSafeInteger();`\n\n##### Random\n\n* get random values between [0,1) `angularMath.getRandom();`\n* get random integer values between the min and max `angularMath.getIntegerRandomRange(min, max);`\n* get random n integers numbers between min and max  `angularMath.getNIntegerRandomRange(min, max, n);`\n\n##### Utils\n\n* check if the value is type number `angularMath.isNumber(number);`\n* check if the number is integer `angularMath.isInteger(number);`\n* check if the number is even `angularMath.isEven(number);`\n* check if the number is odd `angularMath.isOdd(number);`\n* check if the number is palindrome `angularMath.isPalindrome(number);`\n\n##### Convert\n\n* convert a number to string `angularMath.numberToString(number);`\n* convert a number to binary `angularMath.numberToBinary(number);`\n* convert a number to octal `angularMath.numberToOct(number);`\n* convert a number to hexadecimal `angularMath.numberToHex(number);`\n\n##### Number actions\n\n* get x% percent of a number `angularMath.percentOfNumber(number, percent);`\n* change the sign of a number `angularMath.oppositeOfNumber(number);`\n* get the rest of a div from 2 numbers `angularMath.getRest(number, div);`\n* get integer of a number `angularMath.integerOfNumber(number);`\n* get the number with a specific number of decimals `angularMath.getNumberWithDecimals(number, decimals);`\n* convert a number in a positive one `angularMath.absoluteOfNumber(number);`\n* get the power of a number `angularMath.powerOfNumber(number, power);`\n* get the square of a number `angularMath.squareOfNumber(number);`\n* get logarithm of a number `angularMath.logarithmOfNumber(number);`\n* get the nearest integer number of a number `angularMath.nearOfNumber(number);`\n* get the nearest next integer number of a number `angularMath.nextIntegerOfNumber(number);`\n* get the nearest back integer number of a number `angularMath.backIntegerOfNumber(number);`\n* get the reverse number of a number `angularMath.reverseOfNumber(number);`\n* get the length of a number `angularMath.lengthOfNumber(number);`\n* count the number of a specific figure in a number `angularMath.figureOfNumber(number, figure);`\n* get the factorial of an integer number `angularMath.factorialOfNumber(number);`\n\n##### Operations\n\n* get the sum of n numbers `angularMath.sum(n1, n2, n3, ...);`\n* get the dif of n numbers, starting with the first `angularMath.dif(n1, n2, n3, ...);`\n* get the mul of n numbers `angularMath.mul(n1, n2, n3, ...);`\n* get the div of n numbers, starting with the first `angularMath.div(n1, n2, n3, ...);`\n* get the min value of n numbers `angularMath.getMinimum(n1, n2, n3, ...);`\n* get the max value of n numbers `angularMath.getMaximum(n1, n2, n3, ...);`\n* get the sum between integers min and max (sigma function) `angularMath.sigma(min, max);`\n* get the mul between integers min and max (pi function) `angularMath.pi(min, max);`\n\n##### Math\n\n* get the cos value of a number `angularMath.cosNumber(number);`\n* get the sin value of a number `angularMath.sinNumber(number);`\n* get the tan value of a number `angularMath.tanNumber(number);`\n* get the acos value of a number `angularMath.acosNumber(number);`\n* get the asin value of a number `angularMath.asinNumber(number);`\n* get the atan value of a number `angularMath.atanNumber(number);`\n\n# Repository\n* [Repository](https://github.com/s3c4/angular-ts-math)\n\n# License\n\n[MIT](https://github.com/s3c4/angular-ts-math/blob/master/LICENSE) © [Andrei Secareanu](https://github.com/s3c4)\n\nMade with :blue_heart: from London\n# Changelog\n\n##### v2.0.0\n* fixed the issue;\n* the sum, dif, mul and div will return the correct value, rounded to 2 decimals;\n* typescript updated to the latest version;\n\n##### v1.0.7\n\n* add the min integer safe; - [Constants](#constants)\n* add the max integer safe; - [Constants](#constants)\n* add the random n numbers beteen 2 integers min and max; - [Random](#random)\n* add the sigma math operation; - [Operations](#operations)\n* add the pi operation; - [Operations](#operations) \n\n##### v1.0.6\n\n* add factorial functionality; - [Number actions](#number-actions)\n* convert number from decimal to binary; - [Convert](#convert)\n* convert number from decimal to octal; - [Convert](#convert)\n* convert number from decimal to hexadecimal; - [Convert](#convert)\n\n##### v1.0.5\n\n* first release;","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fs3c4%2Fangular-ts-math","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fs3c4%2Fangular-ts-math","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fs3c4%2Fangular-ts-math/lists"}