Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Development

Reply
 
Thread Tools Search this Thread Display Modes
Old 6th August 2011, 18:17   #1  |  Link
jmac698
Registered User
 
Join Date: Jan 2006
Posts: 1,862
lcm and gcd

Quick utilities if you're ever searching for them (I was)
Code:
x=42
y=36
parms=str_bracket(string(x)+","+string(y))+"="
messageclip("lcm"+parms+string(lcm(x,y))+"; gcd"+parms+string(gcd(x,y)))

function gcd(int x, int y){
	t = x%y
	x = y
	y = t
	return (y>0)?gcd(x,y):x
}

function lcm(int x, int y){
  y*abs(x)/gcd(x,y)
}

function str_bracket(string s){
  "("+s+")"
}
jmac698 is offline   Reply With Quote
Old 7th August 2011, 03:25   #2  |  Link
Chikuzen
typo lover
 
Chikuzen's Avatar
 
Join Date: May 2009
Posts: 597
http://www.mediafire.com/download.php?ri8l69r3jho56z3
__________________
my repositories
Chikuzen is offline   Reply With Quote
Old 7th August 2011, 05:51   #3  |  Link
jmac698
Registered User
 
Join Date: Jan 2006
Posts: 1,862
And more timestrings... and gcd
http://users.telenet.be/darnley/avis...ml#timestrings
jmac698 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 00:30.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.