Go to bottom

Random line of code thread

category: code [glöplog]
Code: // incorrect but good enough for now... Quaternion halfAssInterp = Quaternion.Slerp(Points[start].Orientation, Points[end].Orientation, SmootherStep(Mathf.Clamp01(t))); orientation = Quaternion.LookRotation(derivative.normalized, halfAssInterp * Vector3.up);
added on the 2016-02-10 17:11:01 by MsK` MsK`
this.Text = "Evolución (" + sw.ElapsedMilliseconds.ToString() + " ms)";
added on the 2016-02-10 17:35:00 by Aeko Aeko
anim("feedback",feedback).to({"amount":0.8},0).to({"amo unt":0.8},0, Timeline.Easing.Quadratic.EaseIn).to({"amount":0.8},0, Timeline.Easing.Quadratic.EaseIn).to({"amount":1},12.504600044438327, Timeline.Easing.Quadratic.EaseIn).to({"amount":1},0, Timeline.Easing.Cubic.EaseInOut).to({"amount":1},0, Timeline.Easing.Cubic.EaseInOut).to({"amount":1},9.635399955561677, Timeline.Easing.Cubic.EaseInOut).to({"amount":1},0, Timeline.Easing.Cubic.EaseInOut).to({"amount":1},0, Timeline.Easing.Cubic.EaseInOut).to({"amount":0.86133620680685},7.3746 00044438324, Timeline.Easing.Cubic.EaseInOut).to({"amount":0.86133620680685},0).to( {"amount":0.86133620680685},0).to({"amount":0.5},9.8153999555 6167).to({"amount":0.5},0).to({"amount":0.5},0).to({"amo unt":0.9},0.720000000000006).to({"amount":0.9},0).to({"amount ":0.9},0).to({"amount":1},25.449999999999996).to({"amount&quo t;:0.9797005351473923},34.94, Timeline.Easing.Quadratic.EaseIn).to({"amount":0},18.360000000000014, Timeline.Easing.Quadratic.EaseIn).to({"amount":2},21.682463614823575, Timeline.Easing.Cubic.EaseOut).to({"amount":3},0.49736842105264145, Timeline.Easing.Cubic.EaseIn).to({"amount":4},0.6252631578947501, Timeline.Easing.Cubic.EaseIn).to({"amount":5},0.6110526315789286, Timeline.Easing.Cubic.EaseIn).to({"amount":6},0.4916749165053318, Timeline.Easing.Cubic.EaseIn).to({"amount":6},2.6999999999999886, Timeline.Easing.Cubic.EaseIn).to({"amount":2},4.860000000000014, Timeline.Easing.Cubic.EaseIn).to({"amount":1},10.664999999999992, Timeline.Easing.Cubic.EaseIn).to({"amount":0.98},17.887500000000017);
added on the 2016-02-11 00:48:59 by visy visy
^^ I hope that's auto-generated.

Code:// zoom + bounce camera.position.z = 6 - (rTime%30)*0.11; camera.position.y = Math.sin(rTime*0.25)*(5/(rTime%50)); camera.rotation.z = Math.log(rTime)*(2/(rTime%100));
added on the 2016-02-11 09:39:14 by tomaes tomaes
CONSOLE 0,24,0,1
added on the 2016-02-11 15:30:48 by Exin Exin
Code:public List<T> tees; // that's plural of lower case 'T'
added on the 2016-02-12 15:32:56 by xernobyl xernobyl
@tomaes: thankfully yes :D - from MKULTRA by Bilotrip
added on the 2016-02-13 05:01:42 by visy visy
BB Image
BB Image
BB Image

added on the 2016-02-13 14:58:38 by Deus Deus
Excellent engine name (or window title) :)
added on the 2016-02-13 15:00:31 by waffle waffle
well fuck...wrong random thread...
added on the 2016-02-13 15:31:29 by Deus Deus
dc.w $fb01,$fffe,$0180,$005a
dc.w $fc01,$fffe,$0180,$0003
added on the 2016-02-13 21:20:50 by Nosferatu Nosferatu
Code: NS_ENG::model m_protagonist("Mesh/PentagonBase.obj", "Mesh/PentagonBase.mtl"); NS_ENG::model m_P_Arm("Mesh/PentagonArm.obj", "Mesh/PentagonArm.mtl"); //mn is for model node boost::shared_ptr<NS_SG::modelNode> mn_protoganist(new NS_SG::modelNode("protoganist", &m_protagonist, &e_geom)); boost::shared_ptr<NS_SG::objTransform> tran_protagonist(new NS_SG::objTransform("tran_protoganist")); tran_protagonist->s etPosition(NS_VEC::VEC3(0.0f, 0.0f, 0.0f)); tran_protagonist->addChild(mn_protoganist.get()); boost ::shared_ptr<NS_SG::modelNode> m_1_12(new NS_SG::modelNode("1_12", &m_P_Arm, &e_geom)); boost::shared_ptr<NS_SG::objTransform> t_1_12(new NS_SG::objTransform("t1_12")); t_1_12->setPosition(NS_VEC::VEC3 (0.0f, 0.0f, 0.81f)); t_1_12->setRotation(NS_VEC::QUAT(0.0f, 180.0f, 0.0f)); t_1_12->addChild(m_1_12.get()); //lastly tran_pro tagonist->addChild(t_1_12.get()); //and ptrTranProt = tran_protagonist.get();
added on the 2016-02-14 16:57:23 by Deus Deus
Code:var %y1 $calc(($sin($calc(%c/7 + (%cnt * 8))).deg * (($cos($calc(%c/9 + %x)).deg * 40) + (%x / 7))) + 85)
Code:add_1_mul_2: _l = 0 .while _l < 40 .db (_l + 1) * 2 _l = _l + 1 .endwhile
added on the 2016-02-15 13:35:56 by cetone cetone
// Get a random object from array of objects but never oneself (for each object in the array; oneself is in the same array!)

int objectCount = 10;

for(int i=0; i<ObjectCount; i++)
int randomOffset = Random.Range(1, objectCount);

Object randomObject = objects[(i+randomOffset) % objectCount];

(I came up with this to connect some rooms with doorways in a roguelike...and i think this rules because you have no extra-calculations if you randomly selected yourself!)
Code: include ../fluid/balls_touching.asm
added on the 2016-02-19 02:44:54 by losso losso
Code: move.l (a0),d0 eor.l #"ZITE,d0 swap d0 eor.l #"CODE",d0 not.l d0 eor.l #"SHIT",d0 neg.w d0 eor.l #"FUCK",d0 move.l d0,(a0)+
added on the 2016-02-29 07:36:26 by StingRay StingRay
Code:ja neyney
Code:adc bx,318-64
@StingRay, too many eors, that could probably be compacted to swap:eor:neg:eor or even to swap:eor:addq #1:eor :)
added on the 2016-03-09 20:38:42 by lvd lvd
Code: noop $read($2-, w, $+(*,$1,*), $calc($readn + 1))
@StingRay, too many eors, that could probably be compacted to swap:eor:neg:eor

It couldn't.


or even to swap:eor:addq #1:eor :)

addq #1? Not really!

Anyway, this code is neither supposed to be size optimised nor has it been created by me. It's part of the trackloader of an old Zite music disk and used to decrypt the data after loading a sector.
added on the 2016-03-09 22:42:25 by StingRay StingRay
Why not? All eors along with not fuse into single eor,
neg is an equivalent (not counting flags) to not:addq #1, not is also fuses with all previous eors.
added on the 2016-03-09 23:29:29 by lvd lvd
Code:drawline -nr @demo 0 16 %x %y $calc(%x + 80) $calc(%y + 80)
Code:lodsw ;do the


Go to top