Giter VIP home page Giter VIP logo

cubix's People

Contributors

andrecaribe avatar pupilo avatar userxgnu avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

cubix's Issues

Ignorar *.cub

Adicionar no .gitignore os arquivos com extensão .cub.

Sugestão

Acredito que pra tornar o codigo mais efetivo e menos hardcoded, cada lado do cubo deveria ser colocado em um vetor, assim o cubo conteria um vetor de lados e as funções que fossem manipular esses lados n iriam precisar ser chamadas varias vezes! (redução do overhead)

Outra coisa que acredito que poderia ajudar na manutenção do codigo é a técnica de early return. Segue um link explicativo:
https://en.wikibooks.org/wiki/Computer_Programming/Coding_Style/Minimize_nesting#Early_return

Caracteres especiais

Ao criptografar o texto André Coelho Caribé de Azevedo eu obtive:

Avdro© .oenh...aCibl©  e rzeÃe...ÿA....oÃC......dd
...

Ao descriptografar:

André Coelho Caribé de Azevedo
ÿ....................

Creio que o algoritmo não esteja trabalhando bem com caracteres especiais. Seria possível trabalhar com uma codificação como UTF-8?

Warnings e Erro na compilação.

Mac OS 10.7.5 (64bits)

GCC Using built-in specs.
Target: i686-apple-darwin11
Configured with: /private/var/tmp/llvmgcc42/llvmgcc42-2336.9~22/src/configure --disable-checking --enable-werror --prefix=/Applications/Xcode.app/Contents/Developer/usr/llvm-gcc-4.2 --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-prefix=llvm- --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-darwin11 --enable-llvm=/private/var/tmp/llvmgcc42/llvmgcc42-2336.9~22/dst-llvmCore/Developer/usr/local --program-prefix=i686-apple-darwin11- --host=x86_64-apple-darwin11 --target=i686-apple-darwin11 --with-gxx-include-dir=/usr/include/c++/4.2.1
Thread model: posix
gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.9.00)

Output da compilação com ./compilar.sh

Ambar:CubiX andrecaribe$ ./compilar.sh 
Engine.c: In function ‘calculate_matrix’:
Engine.c:103: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘long int’
Engine.c:103: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘long int’
Engine.c: In function ‘P_Matriz’:
Engine.c:235: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘long long int’
Engine.c:235: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘long long int’
Engine.c:236: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘long long int’
Engine.c:236: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘long long int’
Rotations.c: In function ‘from_rotation’:
Rotations.c:51: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘long long int’
Rotations.c:51: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘long long int’
Rotations.c:52: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘long long int’
Rotations.c:52: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘long long int’
Rotations.c: In function ‘from_rotation_invers’:
Rotations.c:82: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘long long int’
Rotations.c:82: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘long long int’
Rotations.c:83: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘long long int’
Rotations.c:83: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘long long int’
Rotations.c: In function ‘X_rotation’:
Rotations.c:112: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘long long int’
Rotations.c:112: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘long long int’
Rotations.c:113: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘long long int’
Rotations.c:113: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘long long int’
Rotations.c: In function ‘X_rotation_invers’:
Rotations.c:145: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘long long int’
Rotations.c:145: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘long long int’
Rotations.c:146: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘long long int’
Rotations.c:146: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘long long int’
Rotations.c: In function ‘Y_rotation’:
Rotations.c:177: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘long long int’
Rotations.c:177: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘long long int’
Rotations.c:178: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘long long int’
Rotations.c:178: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘long long int’
Rotations.c: In function ‘save_cubic_revers’:
Rotations.c:287: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘long long int’
Rotations.c:287: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘long long int’
Rotations.c:299: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘long long int’
Rotations.c:299: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘long long int’
Rotations.c:311: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘long long int’
Rotations.c:311: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘long long int’
Rotations.c:323: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘long long int’
Rotations.c:323: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘long long int’
Rotations.c:335: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘long long int’
Rotations.c:335: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘long long int’
Rotations.c:347: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘long long int’
Rotations.c:347: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘long long int’
Undefined symbols for architecture x86_64:
  "_fcloseall", referenced from:
      _save_cubic in Rotations.o
      _save_cubic_revers in Rotations.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.