首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > JavaScript > 对于prototype.js的JavaScript框架数学扩展

对于prototype.js的JavaScript框架数学扩展

资 源 简 介

This javascript extension for Prototype.js aims to provide more basic tools and functions for math-related development. It extends Math native object, Number and Array native classes. Please visit the Wiki section for some documentation. The Prototype.js javascript framework can be found at http://www.prototypejs.org . ``` /*** Here are some examples of what you can do with math-extend. ***/ // Get the mean value of an array of numbers: Math.mean([1, 2, 3, 4, 5]); // -> returns 3 // Get the standard deviation value of an array of numbers: Math.stdDev([78, 88, 93, 67, 89, 75, 91]); // -> returns approximately 9 // Shuffle an array, which can contain elements of any kind: ["Hello", "World", 1, 2, 3].shuffle(); // -> possible output: [3, "World", 1, "Hello", 2] // Or, randomly select some items from an array: [3, 7, 12, 21, 5, 1, 9].randomDraw(3); // -
VIP VIP
0.192453s