This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (this.ticksCatchable > 0) | |
{ | |
--this.ticksCatchable; | |
} | |
else | |
{ | |
short var28 = 500; | |
if (this.worldObj.canLightningStrikeAt(MathHelper.floor_double(this.posX), MathHelper.floor_double(this.posY) + 1, MathHelper.floor_double(this.posZ))) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function require_clean_index() | |
{ | |
# TODO: Allow to manually set which git directory | |
git diff-index --quiet --cached HEAD | |
if [ $? -ne 0 ]; then | |
echo "This command requires a clean index. Please reset or commit changes and try again."; | |
exit 2; | |
fi | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(collisionAvoidance != Vec3::zero) | |
applySteeringForce (collisionAvoidance, elapsedTime); | |
else | |
{ | |
float distHomeToBall = Vec3::distance (m_home, m_Ball->position()); | |
if( distHomeToBall < 12.0f) | |
{ | |
// go for ball if I'm on the 'right' side of the ball | |
if( b_ImTeamA ? position().x > m_Ball->position().x : position().x < m_Ball->position().x) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package { | |
import com.transmote.flar.FLARManager; | |
import com.transmote.flar.marker.FLARMarker; | |
import com.transmote.flar.marker.FLARMarkerEvent; | |
import flash.display.Sprite; | |
import flash.events.Event; | |
import flash.media.Video; | |
import org.libspark.flartoolkit.support.pv3d.FLARCamera3D; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Fix IE's mind-blowing idiocy --> | |
<script type="text/javascript" charset="utf-8"> | |
if (!window.console) { | |
window.console = {}; | |
} | |
if (!window.console.log) { | |
window.console.log = function () {}; | |
} | |
if (!window.console.error) { | |
window.console.error = function () {}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// function init() | |
seekVehicle = new SimpleVehicle(); | |
seekVehicle.setPosition(Math.random() * displayWidth, 0, Math.random() * displayHeight); | |
seekVehicle.radius = 10; | |
seekVehicle.maxForce = 800.0; //steering force | |
seekVehicle.maxSpeed = 300.0; //velocity | |
seekVehicle.speed = 100; | |
seekBoid = this.addBoid(seekVehicle, 0x00CC00); | |
// function update(currentTime:Number, elapsedTime:Number) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package | |
{ | |
public const TAU:Number = Math.PI * 2; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Taken (with some modifications) from http://actionsnippet.com/?p=1451 | |
private function difference(angle1:Number, angle2:Number, max:Number = 360):Number | |
{ | |
const m:Number = max / 2; | |
var v:Number = ((angle1 - angle2 + m) % max); | |
return (v > 0) ? (v - m) : (v + m); | |
} | |
private function getClosestTime(hoursProgress:Number, index:int):int | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
coffee.fill(); | |
while (coding) | |
{ | |
coffee.temperature--; | |
if (coffee.temperature <= 0) | |
rememberAboutCoffee(); | |
} | |
function rememberAboutCoffee() | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
post_id: /actionscript/why-my-one-line-if-statements-are-unusual | |
date: 2013-04-14 14:36 | |
post_title: 'Why my one line if statements are unusual' | |
return_url: 'http://IQAndreas.github.com/actionscript/why-my-one-line-if-statements-are-unusual/' | |
name: 'Andreas Renberg' | |
email: '[email protected]' | |
link: 'http://iqandreas.github.com' | |
comment: 'Hello world! | |
This is a multi-line comment. |