Basic Math target/project for vector math

This commit is contained in:
Eryn Wells 2015-10-28 20:37:19 -07:00
parent 27a0b21ce6
commit 6434ef1cad
6 changed files with 508 additions and 0 deletions

View file

@ -0,0 +1,394 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
C005DFFE1BE1CBA700F1BD3C /* Math.h in Headers */ = {isa = PBXBuildFile; fileRef = C005DFFD1BE1CBA700F1BD3C /* Math.h */; settings = {ATTRIBUTES = (Public, ); }; };
C005E0051BE1CBA800F1BD3C /* Math.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C005DFFA1BE1CBA700F1BD3C /* Math.framework */; };
C005E00A1BE1CBA800F1BD3C /* MathTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C005E0091BE1CBA800F1BD3C /* MathTests.swift */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
C005E0061BE1CBA800F1BD3C /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = C005DFF11BE1CBA700F1BD3C /* Project object */;
proxyType = 1;
remoteGlobalIDString = C005DFF91BE1CBA700F1BD3C;
remoteInfo = Math;
};
/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
C005DFFA1BE1CBA700F1BD3C /* Math.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Math.framework; sourceTree = BUILT_PRODUCTS_DIR; };
C005DFFD1BE1CBA700F1BD3C /* Math.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Math.h; sourceTree = "<group>"; };
C005DFFF1BE1CBA700F1BD3C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
C005E0041BE1CBA800F1BD3C /* MathTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MathTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
C005E0091BE1CBA800F1BD3C /* MathTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MathTests.swift; sourceTree = "<group>"; };
C005E00B1BE1CBA800F1BD3C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
C005DFF61BE1CBA700F1BD3C /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
C005E0011BE1CBA800F1BD3C /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
C005E0051BE1CBA800F1BD3C /* Math.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
C005DFF01BE1CBA700F1BD3C = {
isa = PBXGroup;
children = (
C005DFFC1BE1CBA700F1BD3C /* Math */,
C005E0081BE1CBA800F1BD3C /* MathTests */,
C005DFFB1BE1CBA700F1BD3C /* Products */,
);
sourceTree = "<group>";
};
C005DFFB1BE1CBA700F1BD3C /* Products */ = {
isa = PBXGroup;
children = (
C005DFFA1BE1CBA700F1BD3C /* Math.framework */,
C005E0041BE1CBA800F1BD3C /* MathTests.xctest */,
);
name = Products;
sourceTree = "<group>";
};
C005DFFC1BE1CBA700F1BD3C /* Math */ = {
isa = PBXGroup;
children = (
C005DFFD1BE1CBA700F1BD3C /* Math.h */,
C005DFFF1BE1CBA700F1BD3C /* Info.plist */,
);
path = Math;
sourceTree = "<group>";
};
C005E0081BE1CBA800F1BD3C /* MathTests */ = {
isa = PBXGroup;
children = (
C005E0091BE1CBA800F1BD3C /* MathTests.swift */,
C005E00B1BE1CBA800F1BD3C /* Info.plist */,
);
path = MathTests;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXHeadersBuildPhase section */
C005DFF71BE1CBA700F1BD3C /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
C005DFFE1BE1CBA700F1BD3C /* Math.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXHeadersBuildPhase section */
/* Begin PBXNativeTarget section */
C005DFF91BE1CBA700F1BD3C /* Math */ = {
isa = PBXNativeTarget;
buildConfigurationList = C005E00E1BE1CBA800F1BD3C /* Build configuration list for PBXNativeTarget "Math" */;
buildPhases = (
C005DFF51BE1CBA700F1BD3C /* Sources */,
C005DFF61BE1CBA700F1BD3C /* Frameworks */,
C005DFF71BE1CBA700F1BD3C /* Headers */,
C005DFF81BE1CBA700F1BD3C /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = Math;
productName = Math;
productReference = C005DFFA1BE1CBA700F1BD3C /* Math.framework */;
productType = "com.apple.product-type.framework";
};
C005E0031BE1CBA800F1BD3C /* MathTests */ = {
isa = PBXNativeTarget;
buildConfigurationList = C005E0111BE1CBA800F1BD3C /* Build configuration list for PBXNativeTarget "MathTests" */;
buildPhases = (
C005E0001BE1CBA800F1BD3C /* Sources */,
C005E0011BE1CBA800F1BD3C /* Frameworks */,
C005E0021BE1CBA800F1BD3C /* Resources */,
);
buildRules = (
);
dependencies = (
C005E0071BE1CBA800F1BD3C /* PBXTargetDependency */,
);
name = MathTests;
productName = MathTests;
productReference = C005E0041BE1CBA800F1BD3C /* MathTests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
C005DFF11BE1CBA700F1BD3C /* Project object */ = {
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0710;
LastUpgradeCheck = 0710;
ORGANIZATIONNAME = "Eryn Wells";
TargetAttributes = {
C005DFF91BE1CBA700F1BD3C = {
CreatedOnToolsVersion = 7.1;
};
C005E0031BE1CBA800F1BD3C = {
CreatedOnToolsVersion = 7.1;
};
};
};
buildConfigurationList = C005DFF41BE1CBA700F1BD3C /* Build configuration list for PBXProject "Math" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
en,
);
mainGroup = C005DFF01BE1CBA700F1BD3C;
productRefGroup = C005DFFB1BE1CBA700F1BD3C /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
C005DFF91BE1CBA700F1BD3C /* Math */,
C005E0031BE1CBA800F1BD3C /* MathTests */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
C005DFF81BE1CBA700F1BD3C /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
C005E0021BE1CBA800F1BD3C /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
C005DFF51BE1CBA700F1BD3C /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
C005E0001BE1CBA800F1BD3C /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
C005E00A1BE1CBA800F1BD3C /* MathTests.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
C005E0071BE1CBA800F1BD3C /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = C005DFF91BE1CBA700F1BD3C /* Math */;
targetProxy = C005E0061BE1CBA800F1BD3C /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin XCBuildConfiguration section */
C005E00C1BE1CBA800F1BD3C /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "-";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.11;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = Debug;
};
C005E00D1BE1CBA800F1BD3C /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "-";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.11;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = macosx;
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = Release;
};
C005E00F1BE1CBA800F1BD3C /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
COMBINE_HIDPI_IMAGES = YES;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
FRAMEWORK_VERSION = A;
INFOPLIST_FILE = Math/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = me.erynwells.graphics.Math;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
};
name = Debug;
};
C005E0101BE1CBA800F1BD3C /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
COMBINE_HIDPI_IMAGES = YES;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
FRAMEWORK_VERSION = A;
INFOPLIST_FILE = Math/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = me.erynwells.graphics.Math;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
};
name = Release;
};
C005E0121BE1CBA800F1BD3C /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
COMBINE_HIDPI_IMAGES = YES;
INFOPLIST_FILE = MathTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = me.erynwells.graphics.MathTests;
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Debug;
};
C005E0131BE1CBA800F1BD3C /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
COMBINE_HIDPI_IMAGES = YES;
INFOPLIST_FILE = MathTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = me.erynwells.graphics.MathTests;
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
C005DFF41BE1CBA700F1BD3C /* Build configuration list for PBXProject "Math" */ = {
isa = XCConfigurationList;
buildConfigurations = (
C005E00C1BE1CBA800F1BD3C /* Debug */,
C005E00D1BE1CBA800F1BD3C /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
C005E00E1BE1CBA800F1BD3C /* Build configuration list for PBXNativeTarget "Math" */ = {
isa = XCConfigurationList;
buildConfigurations = (
C005E00F1BE1CBA800F1BD3C /* Debug */,
C005E0101BE1CBA800F1BD3C /* Release */,
);
defaultConfigurationIsVisible = 0;
};
C005E0111BE1CBA800F1BD3C /* Build configuration list for PBXNativeTarget "MathTests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
C005E0121BE1CBA800F1BD3C /* Debug */,
C005E0131BE1CBA800F1BD3C /* Release */,
);
defaultConfigurationIsVisible = 0;
};
/* End XCConfigurationList section */
};
rootObject = C005DFF11BE1CBA700F1BD3C /* Project object */;
}

View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:Math.xcodeproj">
</FileRef>
</Workspace>

28
Math/Math/Info.plist Normal file
View file

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2015 Eryn Wells. All rights reserved.</string>
<key>NSPrincipalClass</key>
<string></string>
</dict>
</plist>

19
Math/Math/Math.h Normal file
View file

@ -0,0 +1,19 @@
//
// Math.h
// Math
//
// Created by Eryn Wells on 10/28/15.
// Copyright © 2015 Eryn Wells. All rights reserved.
//
#import <Cocoa/Cocoa.h>
//! Project version number for Math.
FOUNDATION_EXPORT double MathVersionNumber;
//! Project version string for Math.
FOUNDATION_EXPORT const unsigned char MathVersionString[];
// In this header, you should import all the public headers of your framework using statements like #import <Math/PublicHeader.h>

24
Math/MathTests/Info.plist Normal file
View file

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>

View file

@ -0,0 +1,36 @@
//
// MathTests.swift
// MathTests
//
// Created by Eryn Wells on 10/28/15.
// Copyright © 2015 Eryn Wells. All rights reserved.
//
import XCTest
@testable import Math
class MathTests: XCTestCase {
override func setUp() {
super.setUp()
// Put setup code here. This method is called before the invocation of each test method in the class.
}
override func tearDown() {
// Put teardown code here. This method is called after the invocation of each test method in the class.
super.tearDown()
}
func testExample() {
// This is an example of a functional test case.
// Use XCTAssert and related functions to verify your tests produce the correct results.
}
func testPerformanceExample() {
// This is an example of a performance test case.
self.measureBlock {
// Put the code you want to measure the time of here.
}
}
}