|
|
|
Prime Number Xtra
Added on 4/6/2007
|
This is a scripting xtra for Macromedia/Adobe Director. This is a very fast xtra for generating prime numbers and discovering if a number is prime or not.
Price: $0
Mediamacros makes no guarantees that this price is correct
Get the Xtra
Prime Number Xtra
ABOUT
Created by Kevin Richard Fink
April 5th 2007
This is a work in progress xtra, as such some features are not yet fully operational. Here is the current status of each call:
Complete features: (stable)
GetListOfPrimes(numPrimes) -- Returns a list of primes of specified
size.
Beta features: (unstable)
IsPrime(n) -- Returns whether or not a number is prime.
INSTALLATION
Simply extract and copy "PrimeNumberXtra.x32" to your xtra directory of your Director Installation
HOW TO USE
-----------------------------------------------------------------------------
GetListOfPrimes (Object me)
DESCRIPTION:
Returns a list containing the number of prime numbers specified
USAGE:
object = new(xtra "PrimeNumberXtra")
put object.getListOfPrimes(100)
-----------------------------------------------------------------------------
isPrime (Object me)
DESCRIPTION:
Returns if the specified number is prime, seems to screw up for very
large numbers, however it is really very fast.. quite possibly the fastest in
existence today.
USAGE:
object = new(xtra "PrimeNumberXtra")
put object.isPrime(97)
|
|