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);
this.Text = "Evolución (" + sw.ElapsedMilliseconds.ToString() + " ms)";
anim("feedback",feedback).to({"amount":0.8},0).to({"amount":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.374600044438324, Timeline.Easing.Cubic.EaseInOut).to({"amount":0.86133620680685},0).to({"amount":0.86133620680685},0).to({"amount":0.5},9.81539995556167).to({"amount":0.5},0).to({"amount":0.5},0).to({"amount":0.9},0.720000000000006).to({"amount":0.9},0).to({"amount":0.9},0).to({"amount":1},25.449999999999996).to({"amount":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);
^^ 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));
CONSOLE 0,24,0,1
Code:
public List<T> tees; // that's plural of lower case 'T'
@tomaes: thankfully yes :D - from MKULTRA by Bilotrip
weeeell...fuck
Excellent engine name (or window title) :)
well fuck...wrong random thread...
dc.w $fb01,$fffe,$0180,$005a
dc.w $fc01,$fffe,$0180,$0003
dc.w $fc01,$fffe,$0180,$0003
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->setPosition(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_protagonist->addChild(t_1_12.get());
//and
ptrTranProt = tran_protagonist.get();
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
// 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!)
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
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)+
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 :)
Code:
noop $read($2-, w, $+(*,$1,*), $calc($readn + 1))
Quote:
@StingRay, too many eors, that could probably be compacted to swap:eor:neg:eor
It couldn't.
Quote:
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.
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.
neg is an equivalent (not counting flags) to not:addq #1, not is also fuses with all previous eors.
Code:
drawline -nr @demo 0 16 %x %y $calc(%x + 80) $calc(%y + 80)
Code:
lodsw ;do the