SDuke524
|
  |
| Joined: 29 Jul 2008 |
| Total Posts: 6267 |
|
|
| 12 Sep 2011 08:47 PM |
local slope="2/5"; local point=Vector3.new(2,3);
--seperating the slope local deno=tonumber(slope:sub(slope:find("/")+1)); local numo=tonumber(slope:sub(1,slope:find("/")-1)); local deci_slope=loadstring("return " .. slope)(); if numo and deno and deci_slope then --point-slope local ps=(point.y>0 and "y-" .. point.y or point.y<0 and "y+" .. (-1*point.y) or "y") .. "=" .. slope .. "(x" .. (point.x>0 and "-" .. point.x or point.x<0 and "+" .. (-1*point.x) or "") .. ")"; --slope-intercept local b=point.y-(point.x*deci_slope); local si="y=" .. slope .. "x" .. (b>0 and "+" .. b or b<0 and "-" .. (-1*b) or ""); --standard form local x,y,c; if (deci_slope*point.x)%1==0 and deci_slope%1==0 then x=deci_slope .. "x"; y="y"; c=point.y+(point.x*deci_slope); else x=(deci_slope*deno) .. "x"; y=deno .. "y"; c=(point.y*deno)+(point.x*deci_slope*deno); end local standard=x .. "+" .. y .. "=" .. c; print(ps); print(si); print(standard); end
All it should do is take the slope and a point then put it in point-slope, slope-intercept and standard form ( being that that's the stupid algebra II homework I got today :/ )
But I'd like it if someone could double check my math ( mostly on the standard form one ) |
|
|
| Report Abuse |
|
|
|
| 12 Sep 2011 08:52 PM |
Is it working
Yes? kthx
No? Fix it
problem = solved |
|
|
| Report Abuse |
|
|
SDuke524
|
  |
| Joined: 29 Jul 2008 |
| Total Posts: 6267 |
|
|
| 12 Sep 2011 08:53 PM |
| Yes it's running, I'm wanting to know if I did my math right so it isn't giving me the wrong results. |
|
|
| Report Abuse |
|
|
|
| 12 Sep 2011 08:57 PM |
| lolwut i would read it but that's a lot of code and i'm currently tr0lling *still doesn't know what "slope" is :(* |
|
|
| Report Abuse |
|
|
NXTBoy
|
  |
| Joined: 25 Aug 2008 |
| Total Posts: 4533 |
|
|
| 13 Sep 2011 02:03 AM |
| You realise that `deci_slope*deno == numo`, since `deci_slope == numo / deno`, right? |
|
|
| Report Abuse |
|
|
sdfgw
|
  |
 |
| Joined: 08 Jan 2009 |
| Total Posts: 41681 |
|
|
| 13 Sep 2011 08:02 AM |
| the standard one seems way off. Also, I've never heard of it before. I guess that's an American thing? |
|
|
| Report Abuse |
|
|
pighead10
|
  |
| Joined: 03 May 2009 |
| Total Posts: 10341 |
|
| |
|
SDuke524
|
  |
| Joined: 29 Jul 2008 |
| Total Posts: 6267 |
|
|
| 13 Sep 2011 07:41 PM |
@NXTboy
Thanks I guess I wasn't paying too much attention.
@sdfgw Ax+By=C |
|
|
| Report Abuse |
|
|
sdfgw
|
  |
 |
| Joined: 08 Jan 2009 |
| Total Posts: 41681 |
|
|
| 14 Sep 2011 10:25 AM |
y = mx + c
y - mx = c
..
I'm guessing A, B and C have to be whole.
y = (a/b)x + c by = ax + bc by - ax = bc |
|
|
| Report Abuse |
|
|
pighead10
|
  |
| Joined: 03 May 2009 |
| Total Posts: 10341 |
|
|
| 14 Sep 2011 12:25 PM |
aha we did something about y = mc + c in maths today
but what is weird is it is about gradients which i got right last year |
|
|
| Report Abuse |
|
|
sdfgw
|
  |
 |
| Joined: 08 Jan 2009 |
| Total Posts: 41681 |
|
|
| 14 Sep 2011 12:33 PM |
pig, you told me you did the linear equation like a year ago
not progressing fast eh |
|
|
| Report Abuse |
|
|
Fl0x
|
  |
| Joined: 06 Aug 2010 |
| Total Posts: 5169 |
|
|
| 14 Sep 2011 12:44 PM |
1+1=x x = 2
We did that todai. I failed at the exam. |
|
|
| Report Abuse |
|
|
sdfgw
|
  |
 |
| Joined: 08 Jan 2009 |
| Total Posts: 41681 |
|
| |
|
|
| 14 Sep 2011 02:01 PM |
I'm stuck in algebra one and I've already learned most of it. :/
STUUPID EXTROVERTS, YOUR SYSTEMS ARE MESSING UP OUR LEARNING.
~+[You already have the source, it's the ASM.]+~ |
|
|
| Report Abuse |
|
|
| |
|
pighead10
|
  |
| Joined: 03 May 2009 |
| Total Posts: 10341 |
|
|
| 17 Sep 2011 04:27 AM |
@sdfgw
what
no i taught myself the linear equation a year ago
we got taught it this week |
|
|
| Report Abuse |
|
|
sdfgw
|
  |
 |
| Joined: 08 Jan 2009 |
| Total Posts: 41681 |
|
|
| 17 Sep 2011 05:16 AM |
linear equations are tame bro
polynomials are where it's at |
|
|
| Report Abuse |
|
|
pighead10
|
  |
| Joined: 03 May 2009 |
| Total Posts: 10341 |
|
|
| 17 Sep 2011 12:24 PM |
i hate/love doing linear equations in maths
love because they're so damn easy that i complete the lesson's work in 10 mins and the teacher has to fnid something else for me to do
hate because everybody else seems to be an idiot and not understand, so we waste most of the lesson practicing it as an entire class. I really still don't get how it's hard in any way tbh |
|
|
| Report Abuse |
|
|
sdfgw
|
  |
 |
| Joined: 08 Jan 2009 |
| Total Posts: 41681 |
|
|
| 17 Sep 2011 12:28 PM |
you don't get how it's hard because you're used to being smart at maths
you are clearly not used to being used to being smart at maths, whereas I am
I don't like to brag, as I don't know if I'm used to being used to being used to being smart at maths yet
besides you're what year 9
linear equations are year 7 / 8 work even in a lower set |
|
|
| Report Abuse |
|
|
pighead10
|
  |
| Joined: 03 May 2009 |
| Total Posts: 10341 |
|
|
| 18 Sep 2011 04:20 AM |
this is beginning of year 9 top set
but i seriously can't see why it's hard to understand, seeing as all we were doing is y = mx + c
find gradient = it goes up by 3, goes across 2, so 3/2 = 1.5 = m
it crosses the y at 4 = 4
THERE I DID IT
WHY DOES MY TOP SET NOT GET THIS?! |
|
|
| Report Abuse |
|
|
sdfgw
|
  |
 |
| Joined: 08 Jan 2009 |
| Total Posts: 41681 |
|
|
| 18 Sep 2011 11:34 AM |
"you don't get how it's hard because you're used to being smart at maths
you are clearly not used to being used to being smart at maths, whereas I am" |
|
|
| Report Abuse |
|
|
pighead10
|
  |
| Joined: 03 May 2009 |
| Total Posts: 10341 |
|
|
| 19 Sep 2011 08:58 AM |
yes, i am used to being smart at maths, but i usually understand how people understand so i can teach them how to understand the bits i understand how the don't understand
but this i don't
even the guy i sit next to, who is one of the top in our top maths set, kept getting it wrong and i didn't have the slightest clue how he got 0.3 when the answer was 8/-3 or something |
|
|
| Report Abuse |
|
|
| |
|
arundel
|
  |
| Joined: 21 Apr 2008 |
| Total Posts: 5762 |
|
|
| 19 Sep 2011 11:34 AM |
Y r u usin arithmetic on a stringz0r.. >_>
n,dec=5,3 num=n/dec
... |
|
|
| Report Abuse |
|
|
Legend26
|
  |
| Joined: 08 Sep 2008 |
| Total Posts: 10586 |
|
| |
|