{{ tocSubheader }}
| {{ 'ml-lesson-number-slides' | message : article.intro.bblockCount}} |
| {{ 'ml-lesson-number-exercises' | message : article.intro.exerciseCount}} |
| {{ 'ml-lesson-time-estimation' | message }} |
Karin.hedin@osteraker.se (Diskussion | bidrag) | Estellecapor1@gmail.com (Diskussion | bidrag) | ||
Rad 43: | Rad 43: | ||
//graph.updateCurve(); | //graph.updateCurve(); | ||
− | var flyttaMig = b.textA(-1.5,0.75,' | + | var flyttaMig = b.textA(-1.5,0.75,'<translate>Drag mig!</translate>',{anchor:p1}); |
− | var flyttaMig2 = b.textA(0,-1,' | + | var flyttaMig2 = b.textA(0,-1,'<translate>Drag mig!</translate>',{anchor:p2}); |
− | var calc = b.textA(9,10,'Två nollställen',{flag:true, fontsize:1.1}); | + | var calc = b.textA(9,10,'<translate>Två nollställen</translate>',{flag:true, fontsize:1.1}); |
$(b.getId(calc)).css({ | $(b.getId(calc)).css({ | ||
Rad 96: | Rad 96: | ||
if (Math.abs(p2.Y()) < 0.25) { | if (Math.abs(p2.Y()) < 0.25) { | ||
− | b.changeText(calc, 'Ett nollställe'); | + | b.changeText(calc, '<translate>Ett nollställe</translate>'); |
b.hide([p3,p4]); | b.hide([p3,p4]); | ||
p2.moveTo([p2.X(), 0]); | p2.moveTo([p2.X(), 0]); | ||
Rad 111: | Rad 111: | ||
p2.setAttribute({fillcolor:mlg.blue}); | p2.setAttribute({fillcolor:mlg.blue}); | ||
if (p1.Y() > p2.Y()) { | if (p1.Y() > p2.Y()) { | ||
− | b.changeText(calc, 'Två nollställen'); | + | b.changeText(calc, '<translate>Två nollställen</translate>'); |
xdist = Math.sqrt(-p2.Y() * Math.pow(p1.X() - p2.X(), 2) / (p1.Y() - p2.Y())); | xdist = Math.sqrt(-p2.Y() * Math.pow(p1.X() - p2.X(), 2) / (p1.Y() - p2.Y())); | ||
p3.moveTo([p2.X() + xdist, 0]); | p3.moveTo([p2.X() + xdist, 0]); | ||
Rad 118: | Rad 118: | ||
} | } | ||
else { | else { | ||
− | b.changeText(calc, 'Inga nollställen'); | + | b.changeText(calc, '<translate>Inga nollställen</translate>'); |
b.hide([p3,p4]); | b.hide([p3,p4]); | ||
} | } | ||
Rad 125: | Rad 125: | ||
p2.setAttribute({fillcolor:mlg.blue}); | p2.setAttribute({fillcolor:mlg.blue}); | ||
if (p1.Y() < p2.Y()) { | if (p1.Y() < p2.Y()) { | ||
− | b.changeText(calc,'Två nollställen'); | + | b.changeText(calc,'<translate>Två nollställen</translate>'); |
xdist = Math.sqrt(-p2.Y() * Math.pow(p1.X() - p2.X(), 2) / (p1.Y() - p2.Y())); | xdist = Math.sqrt(-p2.Y() * Math.pow(p1.X() - p2.X(), 2) / (p1.Y() - p2.Y())); | ||
p3.moveTo([p2.X() + xdist, 0]); | p3.moveTo([p2.X() + xdist, 0]); | ||
Rad 132: | Rad 132: | ||
} | } | ||
else { | else { | ||
− | b.changeText(calc, 'Inga nollställen'); | + | b.changeText(calc, '<translate>Inga nollställen</translate>'); |
b.hide([p3,p4]); | b.hide([p3,p4]); | ||
} | } | ||
Rad 138: | Rad 138: | ||
else { | else { | ||
p2.setAttribute({fillcolor:mlg.blue}); | p2.setAttribute({fillcolor:mlg.blue}); | ||
− | b.changeText(calc,'Inga nollställen'); | + | b.changeText(calc,'<translate>Inga nollställen</translate>'); |
} | } | ||
}); | }); | ||
Rad 185: | Rad 185: | ||
if (Math.round(p2.Y()*5)/5 == 0) { | if (Math.round(p2.Y()*5)/5 == 0) { | ||
− | b.changeText(calc,'Ett nollställe'); | + | b.changeText(calc,'<translate>Ett nollställe</translate>'); |
b.hide([p3,p4]); | b.hide([p3,p4]); | ||
} | } | ||
else if (p2.Y() < 0) { | else if (p2.Y() < 0) { | ||
if (p1.Y() > p2.Y()) { | if (p1.Y() > p2.Y()) { | ||
− | b.changeText(calc,'Två nollställen'); | + | b.changeText(calc,'<translate>Två nollställen</translate>'); |
xdist = Math.sqrt(-p2.Y() * Math.pow(p1.X() - p2.X(), 2) / (p1.Y() - p2.Y())); | xdist = Math.sqrt(-p2.Y() * Math.pow(p1.X() - p2.X(), 2) / (p1.Y() - p2.Y())); | ||
p3.moveTo([p2.X() + xdist, 0]); | p3.moveTo([p2.X() + xdist, 0]); | ||
Rad 197: | Rad 197: | ||
} | } | ||
else { | else { | ||
− | b.changeText(calc,'Inga nollställen'); | + | b.changeText(calc,'<translate>Inga nollställen</translate>'); |
b.hide([p3,p4]); | b.hide([p3,p4]); | ||
} | } | ||
Rad 203: | Rad 203: | ||
else if (p2.Y() > 0) { | else if (p2.Y() > 0) { | ||
if (p1.Y() < p2.Y()) { | if (p1.Y() < p2.Y()) { | ||
− | b.changeText(calc,'Två nollställen'); | + | b.changeText(calc,'<translate>Två nollställen</translate>'); |
xdist = Math.sqrt(-p2.Y() * Math.pow(p1.X() - p2.X(), 2) / (p1.Y() - p2.Y())); | xdist = Math.sqrt(-p2.Y() * Math.pow(p1.X() - p2.X(), 2) / (p1.Y() - p2.Y())); | ||
p3.moveTo([p2.X() + xdist, 0]); | p3.moveTo([p2.X() + xdist, 0]); | ||
Rad 253: | Rad 253: | ||
p4.moveTo([p2.X() - xdist, 0]); | p4.moveTo([p2.X() - xdist, 0]); | ||
b.show([p3,p4]); | b.show([p3,p4]); | ||
− | b.changeText(calc, 'Två nollställen'); | + | b.changeText(calc, '<translate>Två nollställen</translate>'); |
}); | }); | ||
Rad 271: | Rad 271: | ||
p2.moveTo([randX2,0]); | p2.moveTo([randX2,0]); | ||
b.hide([p3,p4]); | b.hide([p3,p4]); | ||
− | b.changeText(calc, 'Ett nollställe'); | + | b.changeText(calc, '<translate>Ett nollställe</translate>'); |
}); | }); | ||
Rad 291: | Rad 291: | ||
p2.moveTo([randX2,randY2]); | p2.moveTo([randX2,randY2]); | ||
b.hide([p3,p4]); | b.hide([p3,p4]); | ||
− | b.changeText(calc, 'Inga nollställen'); | + | b.changeText(calc, '<translate>Inga nollställen</translate>'); |
}); | }); | ||
</jsxgpre> | </jsxgpre> | ||
Rad 305: | Rad 305: | ||
<translate><!--T:11--> | <translate><!--T:11--> | ||
− | Med hjälp av [[Pq-formeln *Rules*|$pq$-formeln]] kan man avöra antalet lösningar till en andragradsfunktion genom att bestämma tecknet på [[Diskriminant *Wordlist*|diskriminanten]], dvs. det som står under rottecknet i $pq$-formeln: | + | Med hjälp av [[Pq-formeln *Rules*|$pq$-formeln]] kan man avöra antalet lösningar till en andragradsfunktion genom att bestämma tecknet på [[Diskriminant *Wordlist*|diskriminanten]], dvs. det som står under rottecknet i $pq$-formeln:</translate> |
\[ | \[ | ||
\left(\dfrac{p}{2}\right)^2-q. | \left(\dfrac{p}{2}\right)^2-q. | ||
\] | \] | ||
− | Är diskriminanten positiv har ekvationen '''två''' lösningar. Är den $0$ har ekvationen '''en''' lösning, och är den negativ får man [[Kvadratroten ur ett negativt tal *Why*|kvadratroten ur ett negativt tal]] vilket innebär att det '''saknas''' reella lösningar.</translate> | + | <translate>Är diskriminanten positiv har ekvationen '''två''' lösningar. Är den $0$ har ekvationen '''en''' lösning, och är den negativ får man [[Kvadratroten ur ett negativt tal *Why*|kvadratroten ur ett negativt tal]] vilket innebär att det '''saknas''' reella lösningar.</translate> |
<PGFTikz> | <PGFTikz> |